Example #1
0
 /**
  * @return bool
  */
 public function getAccessLogic()
 {
     if (!empty($this->permissions)) {
         foreach ($this->permissions as $permission) {
             if (\BackendGate::allows($permission)) {
                 return true;
             }
         }
         return false;
     }
     return true;
 }
Example #2
0
/**
 * @param string|array $action
 *
 * @return bool
 */
function acl_check($action)
{
    return BackendGate::allows($action);
}