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

[SecurityBundle] role_names variable instead of roles#40089

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

Merged
nicolas-grekas merged 1 commit intosymfony:4.4fromwickedOne:role_names
Feb 4, 2021

Conversation

@wickedOne
Copy link
Contributor

@wickedOnewickedOne commentedFeb 4, 2021
edited
Loading

replaced the roles variable with role_names in order to fix cache warming

introduced @d64372d

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#40087
LicenseMIT
Doc PRsymfony/symfony-docs#14923

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.x branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

I did a quick review of this PR, I think most things looks good.

But you have made this PR towards a branch that is not maintained anymore. :/
Could you update thePR base branch to target one of these branches instead? 4.4, 5.2.

Cheers!

Carsonbot

@wickedOnewickedOne changed the base branch from5.0 to5.2February 4, 2021 08:40
@nicolas-grekasnicolas-grekas changed the titlerole_names variable instead of roles[SecurityBundle] role_names variable instead of rolesFeb 4, 2021
@nicolas-grekasnicolas-grekas added this to the4.4 milestoneFeb 4, 2021
@nicolas-grekas
Copy link
Member

That's for 4.4 I suppose?
Also, don't we missauth_checker in the list?

$variables = [
'token' =>$token,
'user' =>$token->getUser(),
'object' =>$subject,
'subject' =>$subject,
'roles' =>$roles,
'role_names' =>$roleNames,
'trust_resolver' =>$this->trustResolver,
'auth_checker' =>$this->authChecker,
];
// this is mainly to propose a better experience when the expression is used
// in an access control rule, as the developer does not know that it's going
// to be handled by this voter
if ($subjectinstanceof Request) {
$variables['request'] =$subject;
}

@wickedOne
Copy link
ContributorAuthor

wickedOne commentedFeb 4, 2021
edited
Loading

you're rigjt, bothauth_checker andsubject appear to be missing from the documentation and theauth_checker is missing as well in the cache warmer.

how do you suggest to proceed? fix these for the 4.4 branch and have the documentation corrected for both the 4.4 and 5.2 branch (as theroles attribute was deprecated in 5.0)?

@wouterj
Copy link
Member

If I'm correct, bothroles androle_names exists in 4.4. So I think we need 2 PRs: one adding the missing vars in 4.4 and after that's merged, another PR removingroles in 5.2.

And we indeed need to add the missing vars to the documentation as well.

@wickedOne
Copy link
ContributorAuthor

ok, i'll update this one and change the base to 4.4

@nicolas-grekas
Copy link
Member

This PR targetting 4.4 would be enough as we'll be able to adjust for 5.2 when merging up.

@wickedOnewickedOne changed the base branch from5.2 to4.4February 4, 2021 10:08
@wickedOne
Copy link
ContributorAuthor

wickedOne commentedFeb 4, 2021
edited
Loading

updated and changed target(still have to update the docs tho)

@stof
Copy link
Member

stof commentedFeb 4, 2021

IIRC,auth_checker was not documented because it was meant to be an internal implementation detail (used to implement theis_granted function which is what should be used)

nicolas-grekas reacted with thumbs up emoji

replaced the roles variable with role_names in order to fix cache warmingfixessymfony#40087
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Thanks@stof, I removedauth_checker.

@nicolas-grekas
Copy link
Member

Thank you@wickedOne.

@nicolas-grekasnicolas-grekas merged commit42b242c intosymfony:4.4Feb 4, 2021
@wickedOnewickedOne deleted the role_names branchFebruary 4, 2021 11:24
OskarStark added a commit to symfony/symfony-docs that referenced this pull requestFeb 8, 2021
…ression language variable (javiereguiluz)This PR was merged into the 4.4 branch.Discussion----------[ExpressionLanguage][Security] Mention the "subject" expression language variableThis was requested insymfony/symfony#40089By the way, in my opinion providing two different ways of doing exactly the same is always confusing.Commits-------4511683 Mention the "subject" expression language variable
This was referencedMar 4, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@dunglasdunglasAwaiting requested review from dunglas

@jderussejderusseAwaiting requested review from jderusse

@lyrixxlyrixxAwaiting requested review from lyrixx

@srozesrozeAwaiting requested review from sroze

@xabbuhxabbuhAwaiting requested review from xabbuh

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

@wouterjwouterjAwaiting requested review from wouterjwouterj is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@wickedOne@carsonbot@nicolas-grekas@wouterj@stof

[8]ページ先頭

©2009-2025 Movatter.jp