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

Manage the menu permissions #2323

Closed
valentin-harrang opened this issue Aug 16, 2018 · 5 comments
Closed

Manage the menu permissions #2323

valentin-harrang opened this issue Aug 16, 2018 · 5 comments
Labels

Comments

@valentin-harrang
Copy link

Hi,

I would like to show / hide my entities in the menu depending on the roles, but it's impossible. For example, I tried to override the menu.html.twig file but it didn't work..

Do you have a solution (I'm using Symfony 4) ?

Thanks in advance

@emulienfou
Copy link
Contributor

I there, I just had to do exactly what your asking for in my project.
Like I know it seems people asking for this feature for a long time ago, I'm sharing my custom code to:

  • Display menu entries based on role permissions
  • Display some columns from list action based on role permissions
  • Display some actions from list action based on role permissions
  • Restrict access to some entities

https://gist.github.com/emulienfou/002317d8015fea34ef7fd0c49b8e59ac

@PierreJoube
Copy link

Hi,

You should look at https://github.com/alterphp/EasyAdminExtensionBundle

It seems ACL management is possible with this extension bundle. I am front of the same problem as you and I'm going to implement this bundle.

Good luck

@valentin-harrang
Copy link
Author

Thanks, but your code is not correct for "Display some actions from list action based on role permissions" @emulienfou . If the user has the VIP role I don't want to display "delete" and "edit" in list and don't have access to these routes either

@Rickobotics
Copy link

badly referenced in priority #3 ...
https://github.com/EasyCorp/EasyAdminBundle/projects/1
It is today the main limitation of the EasyAdminBundle, so much roles are used !!
Could not we move in priority #1 even simplifying at first?

@javiereguiluz
Copy link
Collaborator

As others said, this is in our roadmap. So I'm closing this issue as a duplicate. Thanks!

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

No branches or pull requests

5 participants