title: Access Denied Symfony 2
body: <p>I have been working on a logging in page for an APP im currently building. Its running checks fine but when the user is redirected to /secure_area I see the current error. </p>
  
  <blockquote>
  <pre><code>Access Denied 403 Forbidden - AccessDeniedHttpException 1 linked Exception:
  
  AccessDeniedException »
  </code></pre>
  </blockquote>
  
  <p><strong>My Code so far</strong> </p>
  
  <p><em>security.yml</em></p>
  
  <pre><code>security:
      encoders:
          Symfony\Component\Security\Core\User\User: plaintext
          Simple\ProfileBundle\Entity\User:
              algorithm:        sha1
              encode_as_base64: false
              iterations:       1
  
      role_hierarchy:
          ROLE_ADMIN:       ROLE_USER
          ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  
      providers:
          main:
              entity:
                  class: Simple\ProfileBundle\Entity\User
                  property: username
  
      firewalls:
  
          secured_area:
              pattern:    ^/
              anonymous: ~
              form_login:
                  login_path:  login
                  check_path:  login_check
          dev:
              pattern:  ^/(_(profiler|wdt)|css|images|js)/
              security: false
  
  
      access_control:
            - { path: ^/secure_area, roles: ROLE_ADMIN }
  </code></pre>
  
  <p>*routing_dev.yml* </p>
  
  <pre><code>index:
      pattern:   /
      defaults:  { _controller: SimpleProfileBundle:Security:login }
  
  
  login:
      pattern:   /login
      defaults:  { _controller: SimpleProfileBundle:Security:login }
  
  
  login_check:
      pattern:   /login_check
  
  test_security:
      pattern: /secure_area
      defaults: {_controller: SimpleProfileBundle:Security:dumpString }
  </code></pre>
  
  <p>Any ideas, im new to this framework so starting to understand the basics.</p>
  
  <p>Thanks </p>