Skip to content

Commit

Permalink
Adapt AdminBundle decouple changes - related to pimcore/pimcore#14971
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 authored and aryaantony92 committed Apr 26, 2023
1 parent 37371bf commit 974e055
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 45 deletions.
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"symfony/runtime": "^6.2",
"symfony/dotenv": "^6.2"
},
"conflict": {
"pimcore/pimcore": "v11.0.0-ALPHA1 || v11.0.0-ALPHA2 || v11.0.0-ALPHA3 || v11.0.0-ALPHA4 || v11.0.0-ALPHA5 || v11.0.0-ALPHA6 || v11.0.0-ALPHA7 || v11.0.0-ALPHA8 || v11.0.0-BETA1",
"pimcore/admin-ui-classic-bundle": "v1.0.0-BETA1"
},
"require-dev": {
"codeception/codeception": "^5.0.3",
"codeception/module-symfony": "^3.1.0"
Expand Down
25 changes: 11 additions & 14 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ pimcore:
# timezone: Europe/Berlin
# path_variable: ''
# instance_identifier: ''
# services:
# google:
# client_id: 73893596983.apps.googleusercontent.com
# email: 73893596983@developer.gserviceaccount.com
# simple_api_key: AIzaSyCo9Wj49hYJWW2WgOju4iMYNTvdcBxmyQ8
# browser_api_key: AIzaSyBJX16kWAmUVEz1c1amzp2iKqAfumbcoQQ
# full_page_cache:
# enabled: false
# lifetime: null
Expand All @@ -95,14 +89,6 @@ pimcore:
# return:
# name: ''
# email: ''
# newsletter:
# use_specific: false # set true to use the following options for newsletter delivery
# sender:
# name: ''
# email: ''
# return:
# name: ''
# email: ''

# applicationlog:
# mail_notification:
Expand Down Expand Up @@ -138,3 +124,14 @@ framework:
# transports:
# main: smtp://user:pass@smtp.example.com:port
# pimcore_newsletter: smtp://user:pass@smtp.example.com:port

# pimcore_newsletter:
# default_url_prefix: 'https://my-host.com' # default prefix for your static assets
# use_specific: false # set true to use the following options for newsletter delivery
# sender:
# name: ''
# email: ''
# return:
# name: ''
# email: ''

37 changes: 6 additions & 31 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,21 @@ security:

providers:
pimcore_admin:
id: Pimcore\Bundle\AdminBundle\Security\User\UserProvider
id: Pimcore\Security\User\UserProvider

firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

# Pimcore WebDAV HTTP basic // DO NOT CHANGE!
pimcore_admin_webdav:
pattern: ^/admin/asset/webdav
pimcore_webdav:
pattern: ^/asset/webdav
provider: pimcore_admin
http_basic: ~

# Pimcore admin form login // DO NOT CHANGE!
pimcore_admin:
pattern: ^/admin(/.*)?$
user_checker: Pimcore\Bundle\AdminBundle\Security\User\UserChecker
provider: pimcore_admin
login_throttling:
max_attempts: 3
interval: '5 minutes'
logout:
path: pimcore_admin_logout
target: pimcore_admin_login
form_login:
default_target_path: pimcore_admin_index
always_use_default_target_path: true
login_path: pimcore_admin_login
check_path: pimcore_admin_login_check
username_parameter: username
password_parameter: password
custom_authenticators:
- Pimcore\Bundle\AdminBundle\Security\Authenticator\AdminTokenAuthenticator
two_factor:
auth_form_path: /admin/login/2fa # Path or route name of the two-factor form
check_path: /admin/login/2fa-verify # Path or route name of the two-factor code check
default_target_path: /admin # Where to redirect by default after successful authentication
always_use_default_target_path: false # If it should always redirect to default_target_path
auth_code_parameter_name: _auth_code # Name of the parameter for the two-factor authentication code
trusted_parameter_name: _trusted # Name of the parameter for the trusted device option
multi_factor: false # If ALL active two-factor methods need to be fulfilled (multi-factor authentication)
# Pimcore Admin Bundle firewall
pimcore_admin: '%pimcore_admin_bundle.firewall_settings%'

access_control:
# Pimcore admin ACl // DO NOT CHANGE!
Expand All @@ -54,6 +28,7 @@ security:
- { path: ^/admin/login$, roles: PUBLIC_ACCESS }
- { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS }
- { path: ^/admin, roles: ROLE_PIMCORE_USER }
- { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER }

role_hierarchy:
# Pimcore admin // DO NOT CHANGE!
Expand Down

0 comments on commit 974e055

Please sign in to comment.