Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions api/restHandler/DeploymentConfigurationRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ func (handler *DeploymentConfigurationRestHandlerImpl) enforceForAppAndEnv(appNa
return false
}

object = handler.enforcerUtil.GetEnvRBACNameByAppAndEnvName(appName, envName)
if ok := handler.enforcer.Enforce(token, casbin.ResourceEnvironment, action, object); !ok {
return false
if len(envName) > 0 {
object = handler.enforcerUtil.GetEnvRBACNameByAppAndEnvName(appName, envName)
if ok := handler.enforcer.Enforce(token, casbin.ResourceEnvironment, action, object); !ok {
return false
}
}
return true
}
Expand Down
1 change: 1 addition & 0 deletions pkg/configDiff/DeploymentConfigurationService.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (impl *DeploymentConfigurationServiceImpl) ConfigAutoComplete(appId int, en
if _, ok := cmcsKeyPropertyEnvLevelMap[key]; !ok {
if envId > 0 {
configProperty.ConfigStage = bean2.Inheriting
configProperty.Id = 0
}

}
Expand Down