/**
  * @see parent::getPerm()
  */
 function getPerm($perm)
 {
     if (!isset($this->_ref_sejour->_id)) {
         $this->loadRefsFwd();
     }
     return $this->_ref_sejour->getPerm($perm);
 }
Пример #2
0
 /**
  * @see parent::getPerm()
  */
 function getPerm($permType)
 {
     if (!$this->_ref_consultation) {
         $this->loadRefConsultation();
     }
     switch ($permType) {
         case PERM_EDIT:
             return $this->_ref_consultation->getPerm($permType);
         default:
             // Droits sur l'opération
             if ($this->operation_id) {
                 if (!$this->_ref_operation) {
                     $this->loadRefOperation();
                 }
                 $canOper = $this->_ref_operation->getPerm($permType);
             } else {
                 $canOper = false;
             }
             // Droits sur le séjour
             if ($this->sejour_id) {
                 if (!$this->_ref_sejour) {
                     $this->loadRefSejour();
                 }
                 $canSej = $this->_ref_sejour->getPerm($permType);
             } else {
                 $canSej = false;
             }
             return $canOper || $canSej || $this->_ref_consultation->getPerm($permType);
     }
 }