19declare(strict_types=1);
65 switch ($a_context_type) {
67 return array($this->ref_id);
70 $set =
$ilDB->query(
"SELECT record_id id" .
71 " FROM adv_md_record");
75 $set =
$ilDB->query(
"SELECT field_id id" .
76 " FROM adv_mdf_definition");
84 while ($row =
$ilDB->fetchAssoc($set)) {
95 self::CONTEXT_MD => array(
97 self::ACTION_MD_CREATE_RECORD
99 self::ACTION_MD_IMPORT_RECORDS
102 self::CONTEXT_RECORD => array(
104 self::ACTION_RECORD_EDIT
106 self::ACTION_RECORD_DELETE
108 self::ACTION_RECORD_EXPORT
110 self::ACTION_RECORD_TOGGLE_ACTIVATION
112 self::ACTION_RECORD_EDIT_FIELDS
114 self::ACTION_RECORD_FIELD_POSITIONS
116 self::ACTION_RECORD_CREATE_FIELD
118 "subactions" => array(
119 self::ACTION_RECORD_EDIT_PROPERTY =>
121 self::SUBACTION_RECORD_TITLE
123 self::SUBACTION_RECORD_DESCRIPTION
125 self::SUBACTION_RECORD_OBJECT_TYPES
129 self::CONTEXT_FIELD => array(
131 self::ACTION_FIELD_EDIT,
132 self::ACTION_FIELD_DELETE
134 "subactions" => array(
135 self::ACTION_FIELD_EDIT_PROPERTY =>
137 self::SUBACTION_FIELD_TITLE
139 self::SUBACTION_FIELD_DESCRIPTION
141 self::SUBACTION_FIELD_SEARCHABLE
143 self::SUBACTION_FIELD_PROPERTIES
156 $component_factory =
$DIC[
'component.factory'];
157 yield
from $component_factory->getActivePluginsInSlot(
"amdc");
164 ?
int $a_action_sub_id =
null
168 $ilAccess =
$DIC[
'ilAccess'];
170 if (!$this->
checkPlugins($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id)) {
177 return $ilAccess->checkAccessOfUser($this->
getUserId(),
"read",
"", $this->
getRefId());
Advanced metadata permission helper.
readContextIds(int $a_context_type)
Get all context ids for context type (from DB, is cached)
const int SUBACTION_FIELD_SEARCHABLE
buildPermissionMap()
Build map of context and actions.
const int ACTION_FIELD_DELETE
const int ACTION_RECORD_EDIT
const int SUBACTION_RECORD_OBJECT_TYPES
const int ACTION_RECORD_EXPORT
const int SUBACTION_FIELD_DESCRIPTION
const int SUBACTION_FIELD_TITLE
const int SUBACTION_RECORD_TITLE
const int ACTION_MD_IMPORT_RECORDS
const int SUBACTION_FIELD_PROPERTIES
checkPermission(int $a_context_type, int $a_context_id, int $a_action_id, ?int $a_action_sub_id=null)
Check permission (helper: rbac, plugins)
const int SUBACTION_UNDEFINED
const int ACTION_RECORD_EDIT_PROPERTY
const int ACTION_RECORD_EDIT_FIELDS
const int ACTION_FIELD_EDIT_PROPERTY
const int ACTION_RECORD_FIELD_POSITIONS
const int ACTION_RECORD_DELETE
const int ACTION_FIELD_EDIT
const int ACTION_RECORD_TOGGLE_ACTIVATION
const int SUBACTION_RECORD_DESCRIPTION
const int ACTION_MD_CREATE_RECORD
getActivePlugins()
Get active plugins (for current slot)
const int ACTION_RECORD_CREATE_FIELD
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkRBAC()
Check permission against RBAC.
checkPlugins(int $a_context_type, int $a_context_id, int $a_action_id, ?int $a_action_sub_id=null)
Check permission against plugins.