예제 #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;
 }
예제 #2
0
/**
 * @param string|array $action
 *
 * @return bool
 */
function acl_check($action)
{
    return BackendGate::allows($action);
}