RBAC: Remove action set feature toggle (#101959)
* remove action set feature toggle * don't pass feature toggles to action set service instantiation * linting * test fixes and frontend clean-up * fix test
This commit is contained in:
@@ -1248,12 +1248,6 @@ func (s *Service) canMove(ctx context.Context, cmd *folder.MoveFolderCommand) (b
|
||||
var evaluators []accesscontrol.Evaluator
|
||||
currentFolderScope := dashboards.ScopeFoldersProvider.GetResourceScopeUID(cmd.UID)
|
||||
for action, scopes := range permissions {
|
||||
// Skip unexpanded action sets - they have no impact if action sets are not enabled
|
||||
if !s.features.IsEnabled(ctx, featuremgmt.FlagAccessActionSets) {
|
||||
if action == "folders:view" || action == "folders:edit" || action == "folders:admin" {
|
||||
continue
|
||||
}
|
||||
}
|
||||
for _, scope := range newFolderAndParentUIDs {
|
||||
if slices.Contains(scopes, scope) {
|
||||
evaluators = append(evaluators, accesscontrol.EvalPermission(action, currentFolderScope))
|
||||
|
||||
@@ -842,12 +842,6 @@ func (s *Service) canMoveViaApiServer(ctx context.Context, cmd *folder.MoveFolde
|
||||
var evaluators []accesscontrol.Evaluator
|
||||
currentFolderScope := dashboards.ScopeFoldersProvider.GetResourceScopeUID(cmd.UID)
|
||||
for action, scopes := range permissions {
|
||||
// Skip unexpanded action sets - they have no impact if action sets are not enabled
|
||||
if !s.features.IsEnabled(ctx, featuremgmt.FlagAccessActionSets) {
|
||||
if action == "folders:view" || action == "folders:edit" || action == "folders:admin" {
|
||||
continue
|
||||
}
|
||||
}
|
||||
for _, scope := range newFolderAndParentUIDs {
|
||||
if slices.Contains(scopes, scope) {
|
||||
evaluators = append(evaluators, accesscontrol.EvalPermission(action, currentFolderScope))
|
||||
|
||||
Reference in New Issue
Block a user