Loading src/UnicaenAuth/Assertion/AbstractAssertion.php +24 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw { $this->setAcl($acl); $this->setRole($role); $this->init(); switch (true) { case $this->detectPrivilege($resource): Loading Loading @@ -92,6 +93,19 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw /** * @param string|ResourceInterface $resource * @param string $privilege * * @return bool */ public function isAllowed($resource, $privilege = null) { return $this->getServiceAuthorize()->isAllowed($resource, $privilege); } /** * @return Acl */ Loading Loading @@ -190,6 +204,16 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw /** * Ititialisation des paramètres de l'assertion (si nécessaire) */ public function init() { } /** * @param string $controller * @param string $action Loading Loading
src/UnicaenAuth/Assertion/AbstractAssertion.php +24 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw { $this->setAcl($acl); $this->setRole($role); $this->init(); switch (true) { case $this->detectPrivilege($resource): Loading Loading @@ -92,6 +93,19 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw /** * @param string|ResourceInterface $resource * @param string $privilege * * @return bool */ public function isAllowed($resource, $privilege = null) { return $this->getServiceAuthorize()->isAllowed($resource, $privilege); } /** * @return Acl */ Loading Loading @@ -190,6 +204,16 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw /** * Ititialisation des paramètres de l'assertion (si nécessaire) */ public function init() { } /** * @param string $controller * @param string $action Loading