Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.27 KB | None | 0 0
  1. security:
  2.     encoders:
  3.         Symfony\Component\Security\Core\User\User: plaintext
  4.  
  5.     role_hierarchy:
  6.         ROLE_ADMIN:      ROLE_USER
  7.         ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  8.  
  9.     providers:
  10.        #in_memory:
  11.          #   users:
  12.           #      user:  { password: userpass, roles: [ 'ROLE_USER' ] }
  13.            #     admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
  14.         fos_userbundle:
  15.             id: fos_user.user_manager
  16.  
  17.     firewalls:
  18.         profiler:
  19.             pattern: ^/_profiler
  20.             security: false
  21.  
  22.         wdt:
  23.             pattern: ^/_wdt
  24.             security: false
  25.  
  26.         login:
  27.             pattern: ^/demo/secured/login$
  28.             security: false
  29.  
  30.         secured_area:
  31.             pattern:   ^/demo/secured/
  32.             form_login:
  33.                 check_path: /demo/secured/login_check
  34.                 login_path: /demo/secured/login
  35.             logout:
  36.                 path:  /demo/secured/logout
  37.                 target: /demo/
  38.         main:
  39.             pattern:     .*
  40.             form-login:
  41.                 provider:      fos_userbundle
  42.                 login_path:    /login
  43.                 use_forward:   false
  44.                 check_path:    /login_check
  45.                 failure_path:  null
  46.             logout:      true
  47.             anonymous:   true
  48.             #anonymous: ~
  49.             #http_basic:
  50.             #    realm: "Secured Demo Area"
  51.  
  52.     access_control:
  53.        #- { path: /login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
  54.        
  55.         # The WDT has to be allowed to anonymous users to avoid requiring the login with the AJAX request
  56.         - { path: ^/_wdt/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  57.         - { path: ^/_profiler/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  58.         # AsseticBundle paths used when using the controller for assets
  59.         - { path: ^/js/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  60.         - { path: ^/css/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  61.         # URL of FOSUserBundle which need to be available to anonymous users
  62.         - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  63.         - { path: ^/login_check$, role: IS_AUTHENTICATED_ANONYMOUSLY } # for the case of a failed login
  64.         - { path: ^/user/new$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  65.         - { path: ^/user/check-confirmation-email$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  66.         - { path: ^/user/confirm/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  67.         - { path: ^/user/confirmed$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  68.         - { path: ^/user/request-reset-password$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  69.         - { path: ^/user/send-resetting-email$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  70.         - { path: ^/user/check-resetting-email$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  71.         - { path: ^/user/reset-password/, role: IS_AUTHENTICATED_ANONYMOUSLY }
  72.         # Secured part of the site
  73.         # This config requires being logged for the whole site and having the admin role for the admin part.
  74.         # Change these rules to adapt them to your needs
  75.         - { path: ^/admin/, role: ROLE_ADMIN }
  76.         - { path: ^/.*, role: ROLE_USER }
  77.  
  78.     role_hierarchy:
  79.         ROLE_ADMIN:      ROLE_USER
  80.         ROLE_SUPERADMIN: ROLE_ADMIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement