24 include_once
'./Services/Object/classes/class.ilObjectAccess.php';
54 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"info_short",
"default" =>
true),
55 array(
"permission" =>
"read",
"cmd" =>
"register",
"lang_var" =>
"join_session"),
56 array(
"permission" =>
"read",
"cmd" =>
"unregister",
"lang_var" =>
"event_unregister"),
57 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings"),
58 array(
"permission" =>
"manage_materials",
"cmd" =>
"materials",
"lang_var" =>
"crs_objective_add_mat"),
59 array(
'permission' =>
'manage_members',
'cmd' =>
'members',
'lang_var' =>
'event_edit_members')
77 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
83 $rbacsystem = $DIC[
'rbacsystem'];
84 $ilAccess = $DIC[
'ilAccess'];
93 if (!self::_lookupRegistration($a_obj_id)) {
99 if (self::_lookupRegistered($a_user_id, $a_obj_id)) {
105 include_once
'./Modules/Session/classes/class.ilSessionWaitingList.php';
112 if (self::_lookupRegistration($a_obj_id) && $a_user_id != ANONYMOUS_USER_ID) {
113 return self::_lookupRegistered($a_user_id, $a_obj_id);
128 $ilAccess = $DIC[
'ilAccess'];
130 $t_arr = explode(
"_", $a_target);
132 if ($t_arr[0] !=
"sess" || ((
int) $t_arr[1]) <= 0) {
136 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1]) ||
137 $ilAccess->checkAccess(
"visible",
"", $t_arr[1])) {
153 if (!is_null(self::$registrations)) {
154 return self::$registrations[$a_obj_id];
159 $ilDB = $DIC[
'ilDB'];
161 $query =
"SELECT registration,obj_id FROM event ";
164 self::$registrations[$row->obj_id] = (bool) $row->registration;
166 return self::$registrations[$a_obj_id];
180 if (isset(self::$registered[$a_usr_id])) {
181 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
186 $ilDB = $DIC[
'ilDB'];
189 $query =
"SELECT event_id, registered FROM event_participants WHERE usr_id = " .
$ilDB->quote(
$ilUser->getId(),
'integer');
191 self::$registered[$a_usr_id] = array();
193 self::$registered[$a_usr_id][$row->event_id] = (bool) $row->registered;
195 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
206 self::$booking_repo =
$f->getRepoWithContextObjCache($a_obj_ids);
215 return self::$booking_repo;
static _isSubscriber($a_obj_id, $a_usr_id)
check if user is subscriber
static _preloadData($a_obj_ids, $a_ref_ids)
Preload data.
static getBookingInfoRepo()
Get booking info repo.
_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...
foreach($_POST as $key=> $value) $res
static _getCommands()
get list of command/permission combinations
static _lookupRegistration($a_obj_id)
lookup registrations
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
static _checkGoto($a_target)
check whether goto script will succeed
Factory for reservation repo.
static _lookupRegistered($a_usr_id, $a_obj_id)
lookup if user has registered