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

FEATURE: RedirectAdministrator works as single permission #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions Configuration/Policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ privilegeTargets:
'Neos\Neos\Security\Authorization\Privilege\ModulePrivilege':
'Neos.RedirectHandler.Ui:Backend.Module.Management.Redirects':
matcher: 'management/redirects'
'Neos.RedirectHandler.Ui:Backend.Module.Management':
matcher: 'management'

roles:
'Neos.Neos:Administrator':
Expand All @@ -17,6 +19,10 @@ roles:

'Neos.RedirectHandler.Ui:RedirectAdministrator':
privileges:
- privilegeTarget: 'Neos.Neos:Backend.GeneralAccess'
permission: GRANT
- privilegeTarget: 'Neos.RedirectHandler.Ui:Backend.Module.Management'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply use Neos.Neos:Backend.Module.Management here instead of a new custom privilege target?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried that but that did not work 🤷‍♂️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened when you did?
Did you also adjust the redirect after login setting for Neos?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend using Neos.Neos:Backend.Module.Management and Neos.Neos:Backend.GeneralAccess and that should work.

permission: GRANT
- privilegeTarget: 'Neos.RedirectHandler.Ui:Backend.Module.Management.Redirects'
permission: GRANT
- privilegeTarget: 'Neos.RedirectHandler.Ui:Module'
Expand Down