This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Acl assertions enhancement #5628
Merged
weierophinney
merged 6 commits into
zendframework:develop
from
gauthier:acl_assertions_enhancement
Mar 4, 2014
Merged
Acl assertions enhancement #5628
weierophinney
merged 6 commits into
zendframework:develop
from
gauthier:acl_assertions_enhancement
Mar 4, 2014
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AssertionAggregate allows aggregating multiple assertion to be associated with one ACL rule. This has been done without modifying a single file of existing code. AssertionManager is a simple Plugin Manager allowing to declare Acl asseertions as services. It can be used by AssertionAggregate to add assertions by passing their service name. It could also by used by the Acl component itself, and should be declared as a default service, so that it could rely on Config service to get intialized, but those features would need to alter existing code and I didn't want to do that at this time.
* @param AssertionInterface|string $assertion | ||
* if string, must match a AssertionManager declared service (checked later) | ||
* | ||
* @return \Zend\Permissions\Acl\Assertion\AssertionAggregate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@return self
there's no need for reinstantiating assertions each time it should be verified...
* | ||
* @var | ||
* | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either remove the docblock, or make it useful. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
humm... looks like this was a "temporary" comment to ease Code Insight or something like this - sorry :) I just removed it.
Looks great! |
weierophinney
added a commit
that referenced
this pull request
Mar 4, 2014
Acl assertions enhancement
weierophinney
added a commit
that referenced
this pull request
Mar 4, 2014
weierophinney
added a commit
to zendframework/zend-permissions-acl
that referenced
this pull request
May 15, 2015
…_assertions_enhancement Acl assertions enhancement
weierophinney
added a commit
to zendframework/zend-permissions-acl
that referenced
this pull request
May 15, 2015
- trailing whitespace
weierophinney
added a commit
to zendframework/zend-permissions-acl
that referenced
this pull request
May 15, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AssertionAggregate allows aggregating multiple assertion to be associated with one ACL rule. This has been done without modifying a single file of existing code.
AssertionManager is a simple Plugin Manager allowing to declare Acl asseertions as services. It can be used by AssertionAggregate to add assertions by passing their service name. It could also by used by the Acl component itself, and should be declared as a default service, so that it could rely on Config service to get intialized, but those features would need to alter existing code and I didn't want to do that at this time.