문제

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 :)

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top