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

Allow to define security permissions for menu items #2806

Merged
merged 1 commit into from Jul 1, 2019

Conversation

javiereguiluz
Copy link
Collaborator

This is the first of a series of pull request that will add security/permissions to every part of the backends.

This PR only adds permissions to menu items. I know you need more permissions in other parts of the bundle, but those will be added in future PRs.

@javiereguiluz javiereguiluz added this to the 2.x milestone Jun 29, 2019
Copy link
Contributor

@ndench ndench left a comment

Choose a reason for hiding this comment

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

Can't wait for the rest off the series!

@javiereguiluz javiereguiluz merged commit 56f4a82 into master Jul 1, 2019
javiereguiluz added a commit that referenced this pull request Jul 1, 2019
…viereguiluz)

This PR was merged into the 2.0.x-dev branch.

Discussion
----------

Allow to define security permissions for menu items

This is the first of a series of pull request that will add security/permissions to every part of the backends.

This PR only adds permissions to menu items. I know you need more permissions in other parts of the bundle, but those will be added in future PRs.

Commits
-------

56f4a82 Allow to define security permissions for menu items
@javiereguiluz javiereguiluz deleted the security_roles_menu branch July 6, 2019 13:52
javiereguiluz added a commit that referenced this pull request Jul 6, 2019
…luz)

This PR was squashed before being merged into the 2.0.x-dev branch (closes #2810).

Discussion
----------

Add security permissions to the "list" view

This continues the work started in #2806.

First, you can show/hide entire columns of the list view based on user roles.

Second, you can hide entire item rows based on user permissions. The idea would be to define the `item_permission` option and create a security voter yourself to control which items can users view.

This is how it'd look when there are items which you don't have permission to view:

![image](https://user-images.githubusercontent.com/73419/60462673-34459880-9c4a-11e9-9faa-38b9e8776b18.png)

And when you "mouse over" them _(the GIF looks ugly because the subtle gray background of empty rows is not displayed)_:

![no-permission](https://user-images.githubusercontent.com/73419/60462722-5d662900-9c4a-11e9-9251-d2533a1de80c.gif)

The last step would be to allow/disallow the entire "list" action ... that's more complex because we already have "disallowed actions" config. We may reuse that, deprecate that or add something in addition to that. We'll see.

Commits
-------

c3528ac Add security permissions to the \"list\" view
javiereguiluz added a commit that referenced this pull request Jul 8, 2019
…reguiluz)

This PR was squashed before being merged into the 2.0.x-dev branch (closes #2829).

Discussion
----------

Allow to configure permissions for show/edit/new

In #2806 we added permissions to menus. In #2810 we added permissions to list/search. This PR completes the security feature adding permissions to show/edit/new.

Commits
-------

5417699 Allow to configure permissions for show/edit/new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants