Skip to content

[Security] Fix role to detect logged-in user #20240

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

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

devojifr
Copy link
Contributor

An error has been introduced since 6.2 when checking to see if a user is logged-in

security.rst Outdated
@@ -2654,7 +2654,7 @@ Secondly, you can use the special "attribute" ``IS_AUTHENTICATED_FULLY`` in plac

public function adminDashboard(): Response
{
$this->denyAccessUnlessGranted('IS_AUTHENTICATED');
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
Copy link
Member

@xabbuh xabbuh Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reading the previous paragraph it's rather looks like we should change the sentence before instead to refer to IS_AUTHENTICATED

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry but I don't understand...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a paragraph before this code block which should be changed instead of changing the code example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your reply!
I wasn't sure between IS_AUTHENTICATED and IS_AUTHENTICATED_FULLY.

@devojifr devojifr force-pushed the security-logged-in-role branch from c034506 to a867829 Compare September 24, 2024 09:53
@javiereguiluz
Copy link
Member

Good catch, thanks @devojifr.

@javiereguiluz javiereguiluz merged commit c5a4079 into symfony:6.4 Sep 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants