예제 #1
0
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if (!$this->_ref_group) {
         $this->loadRefsFwd();
     }
     return CPermObject::getPermObject($this, $permType) && $this->_ref_group->getPerm($permType);
 }
 /**
  * Permission generic check
  *
  * @param integer $permType Type of permission : PERM_READ|PERM_EDIT|PERM_DENY
  *
  * @return boolean
  */
 function getPerm($permType)
 {
     return CPermObject::getPermObject($this, $permType);
 }
예제 #3
0
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if ($this->user_id == CAppUI::$user->_id) {
         return true;
     }
     $this->loadRefFunction();
     if ($perm = CPermObject::getPermObject($this, $permType, $this->_ref_function)) {
         return $perm;
     }
     $this->loadBackRefs("secondary_functions");
     foreach ($this->_back["secondary_functions"] as $_link) {
         /** @var  CSecondaryFunction $_link */
         $fonction = $_link->loadRefFunction();
         $fonction->load($_link->function_id);
         if ($perm = $perm || CPermObject::getPermObject($this, $permType, $fonction)) {
             return $perm;
         }
     }
     return $perm;
 }