-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Role Handler isGranted usage in parent Admin Class not working #2605
Comments
Ping @webdevilopers |
I'm no longer maintaining the project with the example. Will close issue for now but keep an eye on it. I have a similar project coming up. |
I may be an old issue but I stumbled upon something similar again. As mentioned here by @MaxDamage:
|
We should add support for both Sonata and Symfony roles. SonataAdminBundle/src/Security/Handler/RoleSecurityHandler.php Lines 47 to 66 in 82a4d6e
Foreach adds soanta perfix for roles, so maybe we can check before it. |
I have a parent Admin Class
Contract
and a child Admin ClassBundle
.My roles are working correctely
when calling the links separately:
I can see both lists as
ROLE_ADMIN
Now I am trying to link both lists:
but the link does not appear. Is
isGranted
limited to the ROLEs on the current Admin Class e.g.LIST
,SHOW
etc?Using the
securityContext
would work:I'm wondering because the docs mentions a similar
EMAIL
example:Yon can also create your own permissions, for example EMAIL (which will turn into role ROLE_SONATA_ADMIN_DEMO_FOO_EMAIL).
http://sonata-project.org/bundles/admin/master/doc/reference/security.html#usage
My complete code:
Possibly related issues:
The text was updated successfully, but these errors were encountered: