31 protected function getKey($controller, $action) {
32 return "$controller.$action";
36 return $this->arrayMap[$this->
getKey($controller, $action)] ??
null;
39 public function addAction(
string $controller,
string $action, ?
string $resource =
'*', ?
string $permission =
'ALL') {
40 $this->arrayMap[$this->
getKey($controller, $action)] = [
41 'resource' => $resource,
42 'permission' => $permission
56 if ($action !==
'*') {
57 $r=new \ReflectionMethod($controller,$action);
58 $class=$r->getDeclaringClass()->getName();
59 if($class!==$controller){
80 foreach ($this->arrayMap as $k => $v) {
82 'controller.action' => $k
90 foreach ($this->arrayMap as $k => $v) {
91 $resource = $v[
'resource'] ??
'*';
92 $permission = $v[
'permission'] ??
'ALL';
101 return $this->arrayMap!=$old;
Manager for caches (Router, Rest, models).
Ubiquity\security\acl$AclManager This class is part of Ubiquity.
Ubiquity\security\acl\cache$PermissionMapObject This class is part of Ubiquity.
Ubiquity\security\acl\cache$PermissionsMap This class is part of Ubiquity.
addAction(string $controller, string $action, ?string $resource=' *', ?string $permission='ALL')
_getRessourcePermission(string $controller, string $action)
getRessourcePermission(string $controller, string $action)
getKey($controller, $action)
Ubiquity\security\acl\cache\traits$AclCacheTrait This class is part of Ubiquity.