5 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
36 array(
"permission" =>
"read",
"cmd" =>
"",
"lang_var" =>
"show",
38 array(
"permission" =>
"read",
"cmd" =>
"exportHTML",
"lang_var" =>
"export_html"),
39 array(
"permission" =>
"write",
"cmd" =>
"editLinks",
"lang_var" =>
"edit_content"),
40 array(
"permission" =>
"write",
"cmd" =>
"settings",
"lang_var" =>
"settings")
53 $t_arr = explode(
"_", $a_target);
55 if ($t_arr[0] !=
"webr" || ((
int) $t_arr[1]) <= 0) {
59 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1]) ||
60 $ilAccess->checkAccess(
"visible",
"", $t_arr[1])) {
78 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
83 if ($a_permission ==
'read') {
84 if (!self::_getFirstLink($a_obj_id) && !$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)) {
89 if ($a_cmd ==
"settings") {
90 if (self::_checkDirectLink($a_obj_id)) {
94 return parent::_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id);
109 if (isset(self::$item[$a_webr_id])) {
110 return self::$item[$a_webr_id];
112 $query =
"SELECT * FROM webr_items " .
113 "WHERE webr_id = " . $ilDB->quote($a_webr_id,
'integer') .
' ' .
114 "AND active = " . $ilDB->quote(1,
'integer') .
' ';
119 $item[
'description'] =
$row->description;
122 $item[
'disable_check'] =
$row->disable_check;
123 $item[
'create_date'] =
$row->create_date;
124 $item[
'last_update'] =
$row->last_update;
143 "SELECT * FROM webr_items WHERE " .
144 $ilDB->in(
"webr_id", $a_obj_ids,
false,
"integer") .
145 " AND active = " . $ilDB->quote(1,
'integer')
147 foreach ($a_obj_ids as
$id) {
152 $item[
'description'] =
$row->description;
155 $item[
'disable_check'] =
$row->disable_check;
156 $item[
'create_date'] =
$row->create_date;
157 $item[
'last_update'] =
$row->last_update;
172 if (isset(self::$single_link[$a_obj_id])) {
173 return self::$single_link[$a_obj_id];
175 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
static _isSingular($a_webr_id)
Check whether there is only one active link in the web resource.
static _checkGoto($a_target)
check whether goto script will succeed
if(!array_key_exists('StateId', $_REQUEST)) $id
static _checkDirectLink($a_obj_id)
Check whether there is only one active link in the web resource.
foreach($_POST as $key=> $value) $res
static _getCommands()
get commands
Create styles array
The data for the language used.
_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 _preloadData($a_obj_ids, $a_ref_ids)
Preload data.
static _getFirstLink($a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one...
Class ilObjLinkResourceAccess.