Skip to content

Commit

Permalink
Adapt AdminBundle decouple changes (#472)
Browse files Browse the repository at this point in the history
* Adapt AdminBundle decouple changes - related to pimcore/pimcore#14971 & pimcore/admin-ui-classic-bundle#29

* add conflicts

* add conflict for pimcore dependencies

* revert trailing comma

* add beta2 conflict for web2print-tools

* revert trailing comma
  • Loading branch information
dvesh3 committed Apr 26, 2023
1 parent 41e2412 commit 3a1d414
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 31 deletions.
14 changes: 14 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
"chrome-php/chrome": "^1.6",
"gotenberg/gotenberg-php": "^1.1"
},
"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",
"pimcore/customer-management-framework-bundle": "v4.0.0-BETA1 || v4.0.0-BETA2",
"pimcore/data-hub": "v1.6.0-BETA1",
"pimcore/ecommerce-framework-bundle": "v1.0.0-BETA1",
"pimcore/newsletter-bundle": "v1.0.0-BETA1",
"pimcore/google-marketing-bundle": "v1.0.0-BETA1",
"pimcore/object-merger": "v4.0.0-BETA1",
"pimcore/output-data-config-toolkit-bundle": "v5.0.0-BETA1 || v5.0.0-BETA2",
"pimcore/personalization-bundle": "v1.0.0-BETA1",
"pimcore/web-to-print-bundle": "v1.0.0-BETA1",
"pimcore/web2print-tools-bundle": "v5.0.0-BETA1 || v5.0.0-BETA2"
},
"suggest": {
"elasticsearch/elasticsearch": "Required for Elastic Search service"
},
Expand Down
38 changes: 7 additions & 31 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ security:

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


# we use a custom user provider which loads users from the Customer class
Expand All @@ -18,40 +18,15 @@ security:
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%'

# Pimcore CMF bundle firewall
cmf_webservice: '%customer_management_framework.firewall_settings%'

# demo_frontend firewall is valid for the whole site
Expand Down Expand Up @@ -100,6 +75,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 3a1d414

Please sign in to comment.