Domanda

Hello everyone I'm pretty new to Symfony and I'm still discovering the full potential of this framework. My question is if it's possible on Symfony2, cross the users permissions between bundles and controllers, i.e., a certain user/group of users to have acess to several bundles and/or the respective controllers of the bundles. Thanks in advance for the time wasted on this :)

È stato utile?

Soluzione

well, sort of. you can create url restrictions. and depending on how you have your controllers and urls set up it is possible to restrict access. the example below restricts access to any url that starts with moderation to people with the moderator role.

- { path: ^/moderation/, roles: ROLE_MODERATOR }

see the docs for details: http://symfony.com/doc/current/book/security.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top