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: Add meta data to roles and privileges #2162

Closed
daniellienert opened this issue Oct 11, 2020 · 5 comments · Fixed by #2166
Closed

FEATURE: Add meta data to roles and privileges #2162

daniellienert opened this issue Oct 11, 2020 · 5 comments · Fixed by #2166
Assignees

Comments

@daniellienert
Copy link
Member

daniellienert commented Oct 11, 2020

When lots of roles (targeting lots of privileges) are defined, managing them and assigning them to users in the Neos backend gets quite complicated and error prone. The major issue is, that we only have the role identifier (somehow truncated) to be displayed in the backend module.

Having two additional (optional) configuration options, label and description for both configuration types would make things much clearer.

Example:

...
    'Neos.Neos:Backend.Service.Workspaces.Index':
      matcher: 'method(Neos\Neos\Controller\Service\WorkspacesController->(index|error|show)Action())'
      label: 'Index Workspaces'
      description: 'List workspaces in the Neos backend module'
...

...
roles:
  'Neos.Neos:LivePublisher':
    label: Neos Live Publisher'
    description: Enables the user to publish changes to the live workspace
    privileges:
...

The result in Neos could be something like this, when clicking on the ℹ️ icon:

image

@daniellienert
Copy link
Member Author

@bwaidelich, would love to read your thoughts on this.

@bwaidelich
Copy link
Member

I think it's a great idea without top much risk involved!

@albe
Copy link
Member

albe commented Oct 11, 2020

I second that assessment by Bastian :) That makes so much sense and should be painless to implement!

@sorenmalling
Copy link
Contributor

If implanted I suggest them being used/displayed in a cli context/command.

Can we make that?

@daniellienert daniellienert self-assigned this Oct 11, 2020
@daniellienert
Copy link
Member Author

Wasn't that hard. Currently struggling with the necessary css and javascript magic to display it kind of clear. (Should just have used a command controller .... 😂 )
image

bwaidelich added a commit that referenced this issue Dec 14, 2020
This builds upon the work started with #2166 and

* Fixes the Policy schema
* Adds label & description to the "magic" base roles
* Adds CLI commands in order to make use of the metadata
  within Flow

Usage:

    ./flow security:listRoles --include-abstract
    ./flow security:describeRole Neos.Flow:Everybody

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

Successfully merging a pull request may close this issue.

4 participants