33 $this->
user = $DIC->user();
34 $this->
lng = $DIC->language();
35 $this->rbacsystem = $DIC->rbac()->system();
36 $this->
access = $DIC->access();
43 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"show",
45 array(
"permission" =>
"write",
"cmd" =>
"editSettings",
"lang_var" =>
"settings")
51 public function _checkAccess(
string $cmd,
string $permission,
int $ref_id,
int $obj_id, ?
int $user_id = null): bool
58 if (is_null($user_id)) {
59 $user_id = $ilUser->getId();
65 if (!self::_lookupOnline($obj_id)
74 if (!self::_lookupOnline($obj_id)) {
81 switch ($permission) {
84 if (!self::_lookupOnline($obj_id) &&
91 if (!$info->isGranted()) {
105 $ilAccess = $DIC->access();
107 $t_arr = explode(
"_", $target);
109 if ($t_arr[0] !==
"wiki" || (((
int) $t_arr[1]) <= 0) && $t_arr[1] !==
"wpage") {
113 if ($t_arr[1] ===
"wpage") {
114 $wpg_id = (
int) $t_arr[2];
116 if ((
int) ($t_arr[3] ?? 0) > 0) {
117 $refs = array((
int) $t_arr[3]);
121 foreach ($refs as
$r) {
122 if ($ilAccess->checkAccess(
"read",
"", (
int) $r) ||
123 $ilAccess->checkAccess(
"visible",
"", (
int) $r)) {
127 } elseif ($ilAccess->checkAccess(
"read",
"", (
int) $t_arr[1]) ||
128 $ilAccess->checkAccess(
"visible",
"", (
int) $t_arr[1])) {
138 $ilDB = $DIC->database();
140 $q =
"SELECT * FROM il_wiki_data WHERE id = " .
141 $ilDB->quote($a_id,
"integer");
143 $wk_rec =
$ilDB->fetchAssoc($wk_set);
145 return (
bool) $wk_rec[
"is_online"];
156 $ilDB = $DIC->database();
158 $q =
"SELECT id, is_online FROM il_wiki_data WHERE " .
159 $ilDB->in(
"id", $a_ids,
false,
"integer");
163 $status[
$r[
"id"]] = (bool) $r[
"is_online"];
176 $ilDB = $DIC->database();
178 $q =
"SELECT * FROM il_wiki_data WHERE id = " .
179 $ilDB->quote($a_id,
"integer");
181 $wk_rec =
$ilDB->fetchAssoc($wk_set);
183 return (
bool) $wk_rec[
"public_files"];
const IL_NO_OBJECT_ACCESS
static _checkGoto(string $target)
addInfoItem(string $a_type, string $a_text, string $a_data="")
add an info item to current info object
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupPublicFiles(int $a_id)
Check wether files should be public.
static lookupWikiId(int $a_page_id)
checkAccessOfUser(int $a_user_id, string $a_operations, int $a_ref_id, string $a_type="")
_checkAccess(string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
static _lookupOnlineStatus(array $a_ids)
see legacyOnlineFilter in ilContainer
static _lookupOnline(int $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...