34 $this->
user = $DIC->user();
35 $this->
lng = $DIC->language();
36 $this->rbacsystem = $DIC->rbac()->system();
37 $this->
access = $DIC->access();
43 array(
"permission" =>
"read",
"cmd" =>
"preview",
"lang_var" =>
"preview",
"default" =>
true),
44 array(
"permission" =>
"write",
"cmd" =>
"view",
"lang_var" =>
"edit_content"),
45 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings"),
46 array(
"permission" =>
"read",
"cmd" =>
"createfromtemplate",
"lang_var" =>
"prtf_create_portfolio_from_template"),
53 public function _checkAccess(
string $cmd,
string $permission,
int $ref_id,
int $obj_id, ?
int $user_id = null): bool
60 if (is_null($user_id)) {
66 if (!self::_lookupOnline($obj_id)
75 if (!self::_lookupOnline($obj_id)) {
84 switch ($permission) {
87 if (!self::_lookupOnline($obj_id) &&
110 $ilDB = $DIC->database();
112 $q =
"SELECT id, is_online FROM usr_portfolio WHERE " .
113 $ilDB->in(
"id", $a_ids,
false,
"integer");
117 $status[$r[
"id"]] = $r[
"is_online"];
130 $ilAccess = $DIC->access();
132 $t_arr = explode(
"_", $target);
134 if ($t_arr[0] !==
"prtt" || ((
int) $t_arr[1]) <= 0) {
138 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1]) ||
139 $ilAccess->checkAccess(
"visible",
"", $t_arr[1])) {
const IL_NO_OBJECT_ACCESS
static _lookupOnlineStatus(array $a_ids)
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 _lookupOnline(int $a_id)
checkAccessOfUser(int $a_user_id, string $a_operations, int $a_ref_id, string $a_type="")
static lookupOnline(int $a_id)
_checkAccess(string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _checkGoto(string $target)
check whether goto script will succeed