コード例 #1
0
ファイル: CService.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if (!$this->_ref_group) {
         $this->loadRefsFwd();
     }
     return CPermObject::getPermObject($this, $permType) && $this->_ref_group->getPerm($permType);
 }
コード例 #2
0
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if (!($this->_ref_user || $this->_ref_function || $this->_ref_group) || !$this->_ref_object) {
         $this->loadRefsFwd();
     }
     $parentPerm = parent::getPerm($permType);
     if (!$this->_id) {
         return $parentPerm;
     }
     if ($this->_id && $this->author_id == CMediusers::get()->_id) {
         return $parentPerm;
     }
     if ($this->_ref_object->_id) {
         $parentPerm = $parentPerm && $this->_ref_object->getPerm($permType);
     } else {
         if ($this->_ref_user->_id) {
             $parentPerm = $parentPerm && $this->_ref_user->getPerm($permType);
         }
         if ($this->_ref_function->_id) {
             $parentPerm = $parentPerm && $this->_ref_function->getPerm($permType);
         }
         if ($this->_ref_group->_id) {
             $parentPerm = $parentPerm && $this->_ref_group->getPerm($permType);
         }
     }
     return $parentPerm;
 }
コード例 #3
0
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if ($this->chir_id) {
         if (!$this->_ref_chir) {
             $this->loadRefChir();
         }
         return $this->_ref_chir->getPerm($permType);
     }
     if ($this->function_id) {
         if (!$this->_ref_function) {
             $this->loadRefFunction();
         }
         return $this->_ref_function->getPerm($permType);
     }
     if ($this->group_id) {
         if (!$this->_ref_group) {
             $this->loadRefGroup();
         }
         return $this->_ref_group->getPerm($permType);
     }
 }
コード例 #4
0
ファイル: CSejour.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if (!$this->_ref_praticien) {
         $this->loadRefPraticien();
     }
     if (!$this->_ref_group) {
         $this->loadRefEtablissement();
     }
     return $this->_ref_group->getPerm($permType) && $this->_ref_praticien->getPerm($permType) && parent::getPerm($permType);
 }