8000 Change security title for checking if user is logged in by alamirault · Pull Request #18036 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Change security title for checking if user is logged in #18036

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Change security title for checking if user is logged in
  • Loading branch information
alamirault authored and OskarStark committed Mar 11, 2023
commit 4b5877c523c7f9efd3f69c257716044f7da127f3
8 changes: 5 additions & 3 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2456,15 +2456,17 @@ these voters is similar to the role-based access checks implemented in the
previous chapters. Read :doc:`/security/voters` to learn how to implement
your own voter.

Checking to see if a User is Logged In (IS_AUTHENTICATED_FULLY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. _checking-to-see-if-a-user-is-logged-in-is-authenticated-fully:

Checking to see if a User is Logged In
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you *only* want to check if a user is logged in (you don't care about roles),
you have the following two options.

Firstly, if you've given *every* user ``ROLE_USER``, you can check for that role.

Secondly, you can use a special "attribute" in place of a role::
Secondly, you can use the special "attribute" ``IS_AUTHENTICATED_FULLY`` in place of a role::

// ...

Expand Down
0