Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Added ability to set multiple assertions and their condition for permissions #320

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PSR2 compliance fix
  • Loading branch information
DavidHavl committed Oct 28, 2016
commit 8c6a9c3c58c2b253b2f369499fe12e65a4173b06
1 change: 0 additions & 1 deletion src/ZfcRbac/Assertion/AssertionSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,5 @@ public function assert(AuthorizationService $authorizationService, $context = nu

return false;
}

}
}
2 changes: 1 addition & 1 deletion src/ZfcRbac/Service/AuthorizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function setAssertion($permission, $assertion)
}

// retrieve an actual instance from assertion plugin manager if necessary
foreach ($assertion['assertions'] as $key=>$value) {
foreach ($assertion['assertions'] as $key => $value) {
if (is_string($value)) {
$assertion['assertions'][$key] = $this->assertionPluginManager->get($value);
Copy link
Contributor

Choose a reason for hiding this comment

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

fetching assertions would be better when they are really needed in assert() method in this case AssertionSet::assert()

}
Expand Down