4include_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))) {
139 $ilAccess =
$DIC->access();
141 $t_arr = explode(
"_", $a_target);
143 if ($t_arr[0] !=
"wiki" || (((
int) $t_arr[1]) <= 0) && $t_arr[1] !=
"wpage") {
147 if ($t_arr[1] ==
"wpage") {
148 $wpg_id = (int) $t_arr[2];
149 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
151 if ((
int) $t_arr[3] > 0) {
152 $refs = array((
int) $t_arr[3]);
156 foreach ($refs as
$r) {
157 if ($ilAccess->checkAccess(
"read",
"",
$r)) {
161 } elseif ($ilAccess->checkAccess(
"read",
"", $t_arr[1])) {
178 $q =
"SELECT * FROM il_wiki_data WHERE id = " .
179 $ilDB->quote($a_id,
"integer");
180 $wk_set =
$ilDB->query($q);
181 $wk_rec =
$ilDB->fetchAssoc($wk_set);
183 return $wk_rec[
"is_online"];
197 $q =
"SELECT * FROM il_wiki_data WHERE id = " .
198 $ilDB->quote($a_id,
"integer");
199 $wk_set =
$ilDB->query($q);
200 $wk_rec =
$ilDB->fetchAssoc($wk_set);
202 return $wk_rec[
"public_files"];
An exception for terminatinating execution or to throw for unit testing.
const IL_NO_OBJECT_ACCESS
_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 _checkGoto($a_target)
check whether goto script will succeed
static _lookupOnline($a_id)
Check wether wiki cast is online.
static _lookupPublicFiles($a_id)
Check wether files should be public.
__construct()
Constructor.
static _getCommands()
get commands
static _getAllReferences($a_id)
get all reference ids of object
static lookupWikiId($a_page_id)
Lookup wiki id.