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] deprecate the RoleInterface#20801

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
fabpot merged 1 commit intosymfony:masterfromxabbuh:deprecate-role-interface
Dec 8, 2016

Conversation

@xabbuh
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

linaori reacted with thumbs up emoji
* @paramRoleInterface[]|string[] $roles An array of roles
* @param UserInterface $user The user!
* @param string $providerKey The provider (firewall) key
* @paramRole[]|string[] $roles An array of roles
Copy link
Member

@ycerutoycerutoDec 6, 2016
edited
Loading

Choose a reason for hiding this comment

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

same as before(Role|string)[] ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Of course, good catch@yceruto!

@xabbuhxabbuhforce-pushed thedeprecate-role-interface branch from48507c6 to807b60dCompareDecember 6, 2016 21:53
@ogizanagi
Copy link
Contributor

What about triggering a deprecation at least from theSecurityDataCollector in case a role does implementRoleInterface without extendingRole?

@xabbuh
Copy link
MemberAuthor

@ogizanagi But such a role would have triggered the deprecation already because of the@deprecated annotation in theRoleInterface (at least in thedev environment).

@ogizanagi
Copy link
Contributor

Right. I forgot about this behavior.

*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The RoleInterface is deprecated since version 3.3 and will be removed in 4.0. Use the Symfony\Component\Security\Core\Role\Role class instead.
Copy link
Member

Choose a reason for hiding this comment

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

Extend the ... instead ofUse the ...?

@xabbuhxabbuhforce-pushed thedeprecate-role-interface branch from807b60d to0393724CompareDecember 7, 2016 08:55
@nicolas-grekasnicolas-grekas modified the milestone:3.xDec 7, 2016
@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commit0393724 intosymfony:masterDec 8, 2016
fabpot added a commit that referenced this pull requestDec 8, 2016
This PR was merged into the 3.3-dev branch.Discussion----------[Security] deprecate the RoleInterface| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |Commits-------0393724 [Security] deprecate the RoleInterface
@xabbuhxabbuh deleted the deprecate-role-interface branchDecember 8, 2016 07:50
@stof
Copy link
Member

stof commentedDec 8, 2016

@fabpot we talked about deprecating the usage of objects as roles entirely in the past, relying on strings only. Should we move forward on this topic ?

jvasseur reacted with thumbs up emoji

@fabpot
Copy link
Member

@stof Indeed, that would be a fantastic move for 4.0.

@fsmeier
Copy link

@fabpot we talked about deprecating the usage of objects as roles entirely in the past, relying on strings only. Should we move forward on this topic ?

Where was this discussed? Can you pls link this, so others and me can understand why this is thebetter way?

valepu reacted with thumbs up emoji

fabpot added a commit that referenced this pull requestFeb 25, 2019
…es (xabbuh)This PR was merged into the 4.3-dev branch.Discussion----------[Security] deprecate the Role and SwitchUserRole classes| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets |#20824| License       | MIT| Doc PR        |symfony/symfony-docs#11047In#20801, we deprecated the `RoleInterface`. The next logical step would be to also deprecate the `Role` class. However, we currently have the `SwitchUserRole` class (a sub-class of `Role`) that acts as an indicator to check whether or not the authenticated user switched to another user.This PR proposes an alternative solution to the usage of the special `SwitchUserRole` class by storing the original token inside the `UsernamePasswordToken`. This PR is not complete, but rather acts as a proof of concept of how we could get rid of the `Role` and the `SwitchUserRole` classes.Please share your opinions whether you think this is a valid approach and I will be happy to finalise the PR.Commits-------d7aaa61 deprecate the Role and SwitchUserRole classes
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@ycerutoycerutoyceruto left review comments

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

8 participants

@xabbuh@ogizanagi@fabpot@stof@fsmeier@yceruto@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp