I'm new to symfony2, trying to figure out someone else's code. As I understand it, it uses fosuserbundle to access the pages, but I cannot understand how it works. Help to understand where to look.

By the way, when you go to the main page, if not logged in, it jumps to / login. How to remove it? thank

  • link to security.xml - yadi.sk/d/BWhHtpDdudZ62 - Diefair
  • I understand, you just understand someone else's project. If so, temporarily comment out line 70 in the security.yml file. - Viktor

1 answer 1

Good day. Configuring FOSUserBundle is quite simple.

It is best to understand the official documentation for the bundle .

In order to not redirect from the main one to the login, you need to change the security settings in the file app/config/security.yml . After reading the documentation, everything should be fairly transparent. If you have any difficulties, add the current app/config/security.yml to your question.

  • added link to question - Diefair
  • @Diefair, at 70 security.yml runoff you have a restriction on the regular expression - - { path: ^/, role: [ROLE_ADMIN ,ROLE_SPORTSMEN,ROLE_TRAINER,ROLE_ZAV,ROLE_METODIST,ROLE_OPEKUN]} . What do you have on the main? It all depends on whether you can show the main content to all users. Plus, the question is still on the hierarchy of roles. access_control has roles that are not in role_hierarchy . - Viktor