title: FOSUserBundle: Setting distinctive roles and authentication URLs based on the roles
body: <p>How should I modify security.yml in order to achieve this scenario?</p>
  
  <p>SCENARIO:</p>
  
  <ul>
  <li>mysitessss.com -> <code>student</code>, <code>lecturer</code> and <code>manager</code> can access</li>
  <li>mysitessss.com/admin -> <code>lecturer</code> and <code>manager</code> can access</li>
  <li>mysitessss.com/admin/private -> <code>manager</code> can access</li>
  </ul>
  
  <p>And Which exact command should I run to create respective users?</p>
  
  <ul>
  <li>Students: php app/console fos:user:create ?????????</li>
  <li>Teachers: php app/console fos:user:create ?????????</li>
  <li>Managers: php app/console fos:user:create ?????????</li>
  </ul>
  
  <p>I read the <a href="https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md" rel="nofollow noreferrer">documentation</a> and <a href="https://stackoverflow.com/questions/11019937/role-hierarchy-with-symfony2">this post</a> but I got confused!</p>
  
  <p><strong>routing.yml</strong></p>
  
  <pre><code>home:
      path: /
  
  admin:
      path: /admin
  
  admin_private:
      path: /admin/private
  </code></pre>
  
  <p><strong>app/config/security.yml</strong></p>
  
  <pre><code>security:
      role_hierarchy:
          ROLE_STUDENT: ?????????
          ROLE_LECTURER: ????????????
          ROLE_MANAGER: ???????
  
      access_control:
          - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
          - { path: ^/, role: ????????? }
          - { path: ^/admin, role: ????????? }
          - { path: ^/admin/private, role: ?????????? }
  </code></pre>