/**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if (!$this->_ref_function) {
         $this->loadRefsFwd();
     }
     return $this->_ref_function->getPerm($permType);
 }
 /**
  * @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($perm_type)
 {
     if ($this->function_id) {
         $this->loadRefFunction();
         return $this->_ref_function->getPerm($perm_type);
     }
     return true;
 }
 /**
  * @see parent::getPerm()
  */
 function getPerm($perm_type)
 {
     if ($this->function_id && !$this->pere_id) {
         $this->loadRefFunction();
         return $this->_ref_function->getPerm($perm_type);
     } elseif ($this->pere_id) {
         $this->loadParent();
         return $this->_ref_pere->getPerm($perm_type);
     }
     return true;
 }
예제 #5
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);
     }
 }
예제 #6
0
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if (!$this->_id) {
         return parent::getPerm($permType);
     }
     if (!$this->_ref_salle) {
         $this->loadRefSalle();
     }
     if ($this->chir_id && !$this->_ref_chir) {
         $this->loadRefChir();
     }
     if ($this->spec_id && !$this->_ref_spec) {
         $this->loadRefSpec();
     }
     $pratPerm = false;
     // Test de Permission
     if ($this->chir_id) {
         $pratPerm = $this->_ref_chir->getPerm($permType);
     } elseif ($this->spec_id) {
         $pratPerm = $this->_ref_spec->getPerm($permType);
     }
     return $this->_ref_salle->getPerm($permType) && $pratPerm;
 }
예제 #7
0
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if ($this->_id && $this->function_id) {
         $this->loadRefFunction();
         return $this->_ref_function->getPerm($permType) && parent::getPerm($permType);
     }
     return parent::getPerm($permType);
 }