fix: rename config -> env and handle env interface better
This commit is contained in:
@@ -71,7 +71,7 @@ func OAuthCallbackHandler() gin.HandlerFunc {
|
||||
// make sure inputRoles don't include protected roles
|
||||
hasProtectedRole := false
|
||||
for _, ir := range inputRoles {
|
||||
if utils.StringSliceContains(envstore.EnvInMemoryStoreObj.GetEnvVariable(constants.EnvKeyProtectedRoles).([]string), ir) {
|
||||
if utils.StringSliceContains(envstore.EnvInMemoryStoreObj.GetSliceStoreEnvVariable(constants.EnvKeyProtectedRoles), ir) {
|
||||
hasProtectedRole = true
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ func OAuthCallbackHandler() gin.HandlerFunc {
|
||||
// check if it contains protected unassigned role
|
||||
hasProtectedRole := false
|
||||
for _, ur := range unasignedRoles {
|
||||
if utils.StringSliceContains(envstore.EnvInMemoryStoreObj.GetEnvVariable(constants.EnvKeyProtectedRoles).([]string), ur) {
|
||||
if utils.StringSliceContains(envstore.EnvInMemoryStoreObj.GetSliceStoreEnvVariable(constants.EnvKeyProtectedRoles), ur) {
|
||||
hasProtectedRole = true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user