예제 #1
0
 /**
  *
  * @return bool
  */
 public function isAccessible()
 {
     // admin can do everything
     if (SJB_System::getSystemSettings('SYSTEM_ACCESS_TYPE') == 'admin' && SJB_Admin::admin_authed()) {
         return true;
     }
     if (!$this->permissionLabel) {
         return $this->allowed;
     }
     $result = false;
     if (is_array($this->permissionLabel)) {
         foreach ($this->permissionLabel as $permission) {
             if ($this->acl->isAllowed($permission, $this->getAclRoleID())) {
                 $result = true;
             }
         }
     } else {
         $result = (bool) $this->acl->isAllowed($this->permissionLabel, $this->getAclRoleID());
     }
     return $result;
 }