24 include_once
'./Services/Object/classes/class.ilObjectAccess.php';
49 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"info_short",
"default" =>
true),
50 array(
"permission" =>
"read",
"cmd" =>
"register",
"lang_var" =>
"join_session"),
51 array(
"permission" =>
"read",
"cmd" =>
"unregister",
"lang_var" =>
"event_unregister"),
52 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings"),
53 array(
"permission" =>
"manage_materials",
"cmd" =>
"materials",
"lang_var" =>
"crs_objective_add_mat"),
54 array(
'permission' =>
'manage_members',
'cmd' =>
'members',
'lang_var' =>
'event_edit_members')
72 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
78 $rbacsystem = $DIC[
'rbacsystem'];
79 $ilAccess = $DIC[
'ilAccess'];
88 if (!self::_lookupRegistration($a_obj_id)) {
94 if (self::_lookupRegistered($a_user_id, $a_obj_id)) {
100 include_once
'./Modules/Session/classes/class.ilSessionWaitingList.php';
107 if (self::_lookupRegistration($a_obj_id) && $a_user_id != ANONYMOUS_USER_ID) {
108 return self::_lookupRegistered($a_user_id, $a_obj_id);
123 $ilAccess = $DIC[
'ilAccess'];
125 $t_arr = explode(
"_", $a_target);
127 if ($t_arr[0] !=
"sess" || ((
int) $t_arr[1]) <= 0) {
131 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1])) {
147 if (!is_null(self::$registrations)) {
148 return self::$registrations[$a_obj_id];
153 $ilDB = $DIC[
'ilDB'];
155 $query =
"SELECT registration,obj_id FROM event ";
158 self::$registrations[
$row->obj_id] = (bool)
$row->registration;
160 return self::$registrations[$a_obj_id];
174 if (isset(self::$registered[$a_usr_id])) {
175 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
180 $ilDB = $DIC[
'ilDB'];
183 $query =
"SELECT event_id, registered FROM event_participants WHERE usr_id = " .
$ilDB->quote(
$ilUser->getId(),
'integer');
185 self::$registered[$a_usr_id] = array();
187 self::$registered[$a_usr_id][
$row->event_id] = (bool)
$row->registered;
189 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
static _isSubscriber($a_obj_id, $a_usr_id)
check if user is subscriber
_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
static _lookupRegistered($a_usr_id, $a_obj_id)
lookup if user has registered