title: Symfony2 FosUserBundle Roles ROLE_ADMIN
body: <p>I've got this problem.</p>
  
  <p>Have configured my Sf2 env with FosUserBundle and FacebookBundle. </p>
  
  <p>I've managed to to some ADMIN only section on the frontend (meaning moderator thing).
  By default, every user created in my project has ROLE_USER only.</p>
  
  <p>The "moderator" thing can only by accessed by having ROLE_ADMIN. The problem is that even I add the role by "<code>$user-&gt;addRole('ROLE_ADMIN')</code>, checking if user has this role failed.
  I would like to show some stuff if user will have this kind of role, but I cannot.</p>
  
  <p>Neither "<code>{% if is_granted('ROLE_ADMIN') %}</code>",
   nor "<code>$this-&gt;container-&gt;get('security.context')-&gt;isGranted('ROLE_ADMIN')</code>" succedded. </p>
  
  <p>Everytime I'm getting FALSE or nothing when it comes to TWIG. </p>
  
  <p><strong>Checking if user has ROLE_USER works.</strong></p>
  
  <p>Just to be sure I'm adding my config stuff.</p>
  
  <pre><code>security:
  encoders:
      FOS\UserBundle\Model\UserInterface: sha512
      Symfony\Component\Security\Core\User\User: plaintext
  
  role_hierarchy:
      ROLE_ADMIN:       ROLE_USER
      ROLE_SUPER_ADMIN: ROLE_ADMIN
  
  providers:
      chain_provider:
          chain:
            providers: [fos_userbundle, my_fos_facebook_provider]
      fos_userbundle:
          id: user_provider
      my_fos_facebook_provider:
          id: my.facebook.user
  
  
  firewalls:
      public:
          pattern: ^/
          form_login:
              login_path: /login
              check_path: /login_check
              provider: fos_userbundle
              csrf_provider: form.csrf_provider
              use_referer: true
          fos_facebook:
              app_url: "http://www.facebook.com/apps/application.php?id={{APPID}}"
              server_url: "http://l.local/app_dev.php/"
              login_path: /login
              check_path: /login_fb_check
              default_target_path: /
              provider: my_fos_facebook_provider
              use_referer: true
          logout:
              path:   /logout
              invalidate_session: false
          anonymous:    true
  
  access_control:
      - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/admin/, role: ROLE_ADMIN }
      - { path: ^/secured/.*, role: IS_AUTHENTICATED_FULLY }
      - { path: ^/facebook/,  role: [ROLE_FACEBOOK] }
      - { path: ^/dodaj$, role: ROLE_USER }
      - { path: ^/.*, role: [IS_AUTHENTICATED_ANONYMOUSLY] }
  </code></pre>
  
  <p>Please, if anyone could help, cause I do not know what to do. </p>
  
  <p>I'm always checking to be sure if my role("ROLE_ADMIN") is added in my database, and in fact, it is.</p>