4 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
45 $this->
user = $DIC->user();
46 $this->lng = $DIC->language();
47 $this->rbacsystem = $DIC->rbac()->system();
48 $this->access = $DIC->access();
67 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"show",
69 array(
"permission" =>
"write",
"cmd" =>
"editSettings",
"lang_var" =>
"settings")
87 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
94 if ($a_user_id ==
"") {
102 && !
$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)) {
118 switch ($a_permission) {
122 (!
$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id))) {
127 include_once(
"./Modules/Exercise/RepoObjectAssignment/classes/class.ilExcRepoObjAssignment.php");
129 if (!
$info->isGranted()) {
146 $ilAccess = $DIC->access();
148 $t_arr = explode(
"_", $a_target);
150 if ($t_arr[0] !=
"wiki" || (((
int) $t_arr[1]) <= 0) && $t_arr[1] !=
"wpage") {
154 if ($t_arr[1] ==
"wpage") {
155 $wpg_id = (int) $t_arr[2];
156 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
158 if ((
int) $t_arr[3] > 0) {
159 $refs = array((
int) $t_arr[3]);
163 foreach ($refs as
$r) {
164 if ($ilAccess->checkAccess(
"read",
"", $r)) {
168 } elseif ($ilAccess->checkAccess(
"read",
"", $t_arr[1])) {
183 $ilDB = $DIC->database();
185 $q =
"SELECT * FROM il_wiki_data WHERE id = " .
186 $ilDB->quote($a_id,
"integer");
187 $wk_set =
$ilDB->query($q);
188 $wk_rec =
$ilDB->fetchAssoc($wk_set);
190 return $wk_rec[
"is_online"];
202 $ilDB = $DIC->database();
204 $q =
"SELECT * FROM il_wiki_data WHERE id = " .
205 $ilDB->quote($a_id,
"integer");
206 $wk_set =
$ilDB->query($q);
207 $wk_rec =
$ilDB->fetchAssoc($wk_set);
209 return $wk_rec[
"public_files"];
static getInstance()
Get instance.
const IL_NO_OBJECT_ACCESS
static _getCommands()
get commands
static _getAllReferences($a_id)
get all reference ids of object
static _checkGoto($a_target)
check whether goto script will succeed
static lookupWikiId($a_page_id)
Lookup wiki id.
static _lookupPublicFiles($a_id)
Check wether files should be public.
__construct()
Constructor.
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcce...
static _lookupOnline($a_id)
Check wether wiki cast is online.