5 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
33 "permission" =>
"read",
38 array(
"permission" =>
"write",
"cmd" =>
"view",
"lang_var" =>
"edit_content"),
39 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings"),
54 $ilAccess = $DIC[
'ilAccess'];
56 $t_arr = explode(
'_', $a_target);
57 if ($t_arr[0] !=
'bibl' || ((
int) $t_arr[1]) <= 0) {
60 if ($ilAccess->checkAccess(
'read',
'', $t_arr[1])) {
80 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
85 $rbacsystem = $DIC[
'rbacsystem'];
86 $ilAccess = $DIC[
'ilAccess'];
87 if ($a_user_id ==
"") {
92 if (!self::checkEntryIdMatch($a_obj_id,
$_GET[ilObjBibliographicGUI::P_ENTRY_ID])) {
99 if (!self::_lookupOnline($a_obj_id)
100 && !$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)
109 if (!self::_lookupOnline($a_obj_id)) {
116 switch ($a_permission) {
119 if (!self::_lookupOnline($a_obj_id)
120 && (!$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id))
139 private static function checkEntryIdMatch($obj_id, $entry_id)
144 $ilBiblEntry = ilBiblEntry::find($entry_id);
145 if (is_null($ilBiblEntry)) {
149 return ($ilBiblEntry->getDataId() == $obj_id);
161 $ilDB = $DIC[
'ilDB'];
162 $q =
"SELECT is_online FROM il_bibl_data WHERE id = " .
$ilDB->quote($a_id,
"integer");
163 $bibl_set =
$ilDB->query($q);
164 $bibl_rec =
$ilDB->fetchAssoc($bibl_set);
166 return $bibl_rec[
"is_online"];
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...
Class ilObjBibliographicAccess.
static _lookupOnline($a_id)
Check wether bibliographic is online or not.
static _getCommands()
get commands
static _checkGoto($a_target)