Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically configure the TokenChecker service #1549

Merged
merged 2 commits into from Mar 30, 2020

Conversation

@bytehead
Copy link
Member

bytehead commented Mar 22, 2020

Q A
Fixed issues #1548
Docs PR or issue contao/docs#307

With role_hierarchy configured in Symfony security config/packages/security.yaml, the security.access.simple_role_voter gets removed:

The service "contao.security.token_checker" has a dependency 
on a non-existent service "security.access.simple_role_voter".

See here:
https://github.com/symfony/symfony/blob/8397eb79e003c52b93339c34d9bcafe4848e82c2/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L165-L175

@bytehead bytehead added the defect label Mar 22, 2020
@bytehead bytehead added this to the 4.9 milestone Mar 22, 2020
@bytehead bytehead requested a review from contao/reviewers Mar 22, 2020
@bytehead bytehead self-assigned this Mar 22, 2020
@bytehead bytehead linked an issue that may be closed by this pull request Mar 22, 2020
@bytehead bytehead force-pushed the bytehead:fix/security-role-hierarchy branch from 1bafdf2 to 69f3c70 Mar 23, 2020
@leofeyer leofeyer requested a review from aschempp Mar 23, 2020
Copy link
Contributor

aschempp left a comment

Where does the security.role_hierarchy.roles parameter come from? Any example from Symfony?

@bytehead

This comment has been minimized.

@aschempp

This comment has been minimized.

Copy link
Contributor

aschempp commented Mar 26, 2020

Thats what I assumed. That‘s a bundle configuration, not a container parameter?

@bytehead

This comment has been minimized.

Copy link
Member Author

bytehead commented Mar 26, 2020

It's a normal Symfony security configuration as we and others use it in Symfony applications.

Whatever you call this, it's set as a container parameter:
https://github.com/symfony/symfony/blob/8397eb79e003c52b93339c34d9bcafe4848e82c2/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L173

@leofeyer leofeyer requested a review from aschempp Mar 30, 2020
@leofeyer leofeyer merged commit 4f0aef5 into contao:4.9 Mar 30, 2020
8 checks passed
8 checks passed
Coverage
Details
Coding Style
Details
PHP 7.2
Details
PHP 7.3
Details
PHP 7.4
Details
Prefer Lowest
Details
Bundles
Details
Windows
Details
@leofeyer

This comment has been minimized.

Copy link
Member

leofeyer commented Mar 30, 2020

Thank you @bytehead.

@bytehead bytehead deleted the bytehead:fix/security-role-hierarchy branch Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.