Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make this work with UserManager role? #41

Open
lorenzulrich opened this issue Oct 16, 2023 · 1 comment
Open

How to make this work with UserManager role? #41

lorenzulrich opened this issue Oct 16, 2023 · 1 comment

Comments

@lorenzulrich
Copy link
Contributor

A person having the Neos.Neos:UserManager role is allowed to create/edit users with the same or lower privileges - based on their roles.

When using Sandstorm.NeosAcl, you will normally assign Neos.Neos:LivePublisher (or Neos.Neos:Editor) to such users so the dynamic roles don't need to be assigned explicitely.

However, if they don't have these roles assigned explicitely, they technically don't have the same or higher permissions than users with dynamic roles, therefore they can't edit, remove or impersonate them.

How could this be solved? I was thinking about a parent role Sandstorm.NeosAcl:DynamicRole that all dynamic roles inherit from, ut I'm not sure if this would solve the problem?

Steps to reproduce

  • Log in as Administrator.
  • Create a dynamic role Foo.
  • Create a user user-manager with roles Neos.Neos:Editor and Neos.Neos:UserManager.
  • Create a user restricted-editorwith permissions RestrictedEditor and the dynamic role Foo.
  • Impersonate user user-manager and go to the user management module.

Expected behaviour

  • User user-manager can edit/remove user restricted-editor because they (implicitly) have higher permissions.

Actual behaviour

  • User user-manager can't edit/remove user restricted-editor because they don't have the dynamic Role applied.

Workaround

  • Assign all dynamic Roles to user user-manager.
@lorenzulrich
Copy link
Contributor Author

The determination whether editing/deleting/impersonating a user is allowed is based on https://github.com/neos/neos-development-collection/blob/9.0/Neos.Neos/Classes/ViewHelpers/Backend/IsAllowedToEditUserViewHelper.php. Here, there is a comparison between the number of roles of the UserManager user and the user to be edited/removed/impersonated. This is a but undercomplex and maybe not so much a topic of NeosAcl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant