Skip to content
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

EZP-28926: Add a legacy security voter decorator #146

Merged
merged 3 commits into from
Mar 29, 2018
Merged

Conversation

emodric
Copy link
Collaborator

@emodric emodric commented Mar 22, 2018

This allows checking for legacy modules/functions before exceptions are thrown.

It only rethrows the exception if for some reason this voter votes with ACCESS_ABSTAIN.

Needed for legacy permission checking after ezsystems/ezpublish-kernel#2273.

…y modules/functions before exceptions are thrown
@emodric emodric requested a review from andrerom March 22, 2018 09:07
@andrerom
Copy link
Contributor

Needed for legacy permission checking after

You mean netgen legacy admin or something? legacy extensions tend to use legacy api for this right? so not really affected or?

@emodric
Copy link
Collaborator Author

emodric commented Mar 22, 2018

Netgen legacy admin, yes, but really any custom code from the new stack checking for legacy permissions.

We have some pages implemented in the frontend too which reuse pieces of legacy, while checking for legacy permissions too with permissions resolver.

@andrerom andrerom requested a review from kmadejski March 22, 2018 12:21
Copy link
Member

@kmadejski kmadejski left a comment

Choose a reason for hiding this comment

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

+1 besides missing PHPDocs.

return true;
}

public function vote(TokenInterface $token, $object, array $attributes)
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to see PHPDocs here.

@emodric
Copy link
Collaborator Author

emodric commented Mar 26, 2018

@kmadejski Added PHPDoc 👍

@emodric
Copy link
Collaborator Author

emodric commented Mar 27, 2018

@andrerom OK to merge and tag?

@emodric emodric merged commit cf1cfc5 into master Mar 29, 2018
@emodric emodric deleted the security_voter branch March 29, 2018 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants