/** * @see parent::getPerm() */ function getPerm($perm) { if (!isset($this->_ref_object->_id)) { $this->loadRefsFwd(); } return $this->public ? $this->_ref_object->getPerm($perm) : $this->_ref_object->getPerm($perm) && $this->_ref_user->getPerm(PERM_EDIT); }
/** * Permission generic check * * @param int $permType Type of permission : PERM_READ|PERM_EDIT|PERM_DENY * * @return boolean */ function getPerm($permType) { if (!$this->_ref_user) { $this->loadRefsFwd(); } return $this->_ref_user->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; }
/** * @see parent::getPerm() */ function getPerm($permType) { if (!$this->_ref_chir || !$this->_ref_function) { $this->loadRefsFwd(); } return $this->_ref_chir->getPerm($permType) || $this->_ref_function->getPerm($permType); }
/** * @see parent::getPerm() */ function getPerm($permType) { if (!$this->_id) { return parent::getPerm($permType); } if (!$this->_ref_chir) { $this->loadRefChir(); } return $this->_ref_chir->getPerm($permType) && parent::getPerm($permType); }
/** * get the permission type * * @param int $permType permission type * * @return bool */ function getPerm($permType) { if (CAppUI::$user->isAdmin()) { return true; } if (CModule::getCanDo('astreintes')->edit && $this->_ref_user->getPerm($permType)) { return true; } /* @todo À quoi sert ce droit ? */ if (CModule::getCanDo("astreintes")->read && $permType <= PERM_READ) { return true; } return false; }
/** * @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); } }
/** * @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; }
/** * @see parent::getPerm() */ public function getPerm($permType) { $this->loadPraticien(); return $this->_ref_praticien->getPerm($permType); }
/** * @see parent::getPerm() */ function getPerm($permType) { $this->loadRefPlageConsult(); return $this->_ref_chir->getPerm($permType) && parent::getPerm($permType); }