Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] document current user attribute in the main security doc entry#20864

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
94noni wants to merge1 commit intosymfony:7.2
base:7.2
Choose a base branch
Loading
from94noni:patch-12

Conversation

94noni
Copy link
Contributor

@94noni94noni commentedApr 7, 2025
edited
Loading

I know its documented rapidly (via a code diff example) on top of this file
but here on a controller I thinks its more usefull rather than using the getUser of the abstract controller
wdyt?

also unrelated but, would it be possible to display the class name here ?
seeing onlygetUser can be misleading, what aboutSecurity::getUser
because getUser is globally generic in the codebase
Capture d’écran 2025-04-07 à 09 38 21

@@ -2100,6 +2101,11 @@ accessed via the ``getUser()`` shortcut in the
// For example, if you added a getFirstName() method, you can use that.
return new Response('Well hi there '.$user->getFirstName());
}

public function me(#[CurrentUser] User $user): Response

Choose a reason for hiding this comment

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

What about unauthenticated users?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

good question, should I add an IsGranted above the action? :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

@wouterjwouterjAwaiting requested review from wouterj

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@94noni@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp