hasAccess() public method

Expression forms: - a single permission string starting with a letter and consisting of letters, numbers and characters .:-_ and whitespace - a boolean expression with multiple permissions and operators like &&, || and (...) parenthesis Examples: - a single permission string can be "create_posts", "create posts", "posts:create" etc. - a boolean expression with multiple permissions boolean expression can be "create_posts && delete_posts", "(create posts && delete posts) || manage posts" etc.
public hasAccess ( string $expression ) : boolean
$expression string
return boolean
 /**
  * Proxy permissioncheck
  * @param $permission
  * @return bool
  */
 public function hasAccess($permission)
 {
     return $this->user->hasAccess($permission);
 }
Example #2
0
 public function hasAccess($expression)
 {
     return $this->isAdministrator() || parent::hasAccess($expression);
 }