24 include_once
'./Services/Object/classes/class.ilObjectAccess.php';
50 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"info_short",
"default" =>
true),
51 array(
"permission" =>
"read",
"cmd" =>
"register",
"lang_var" =>
"join_session"),
52 array(
"permission" =>
"read",
"cmd" =>
"unregister",
"lang_var" =>
"event_unregister"),
53 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings"),
54 array(
"permission" =>
"write",
"cmd" =>
"materials",
"lang_var" =>
"crs_objective_add_mat"),
55 array(
'permission' =>
'write',
'cmd' =>
'members',
'lang_var' =>
'event_edit_members')
73 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
79 $a_user_id = $ilUser->getId();
81 include_once
'./Modules/Session/classes/class.ilSessionParticipants.php';
88 if(!self::_lookupRegistration($a_obj_id))
93 if($ilUser->isAnonymous())
98 if($part->isAssigned($a_user_id))
103 if($part->isSubscriber($a_user_id))
108 include_once
'./Modules/Session/classes/class.ilSessionWaitingList.php';
117 if(self::_lookupRegistration($a_obj_id) && $a_user_id != ANONYMOUS_USER_ID)
119 return self::_lookupRegistered($a_user_id,$a_obj_id);
134 $t_arr = explode(
"_", $a_target);
136 if ($t_arr[0] !=
"sess" || ((
int) $t_arr[1]) <= 0)
141 if($ilAccess->checkAccess(
"read",
"", $t_arr[1]))
158 if(!is_null(self::$registrations))
160 return self::$registrations[$a_obj_id];
165 $query =
"SELECT registration,obj_id FROM event ";
169 self::$registrations[
$row->obj_id] = (bool)
$row->registration;
171 return self::$registrations[$a_obj_id];
185 if(isset(self::$registered[$a_usr_id]))
187 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
192 $query =
"SELECT event_id, registered FROM event_participants WHERE usr_id = ".$ilDB->quote($ilUser->getId(),
'integer');
194 self::$registered[$a_usr_id] =
array();
197 self::$registered[$a_usr_id][
$row->event_id] = (bool)
$row->registered;
199 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
_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::checkAcc...
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
Create styles array
The data for the language used.
static _lookupRegistered($a_usr_id, $a_obj_id)
lookup if user has registered
static getInstanceByObjId($a_obj_id)
Get instance by obj type.