Access class for chatroom objects.
More...
|
| _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="") |
| {} More...
|
|
| canBeDelivered (ilWACPath $ilWACPath) |
| - Parameters
-
- Returns
- bool
More...
|
|
| _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::checkAccess) More...
|
|
| _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id) |
| check condition More...
|
|
| canBeDelivered (ilWACPath $ilWACPath) |
| - Parameters
-
- Returns
- bool
More...
|
|
Access class for chatroom objects.
- Author
- Jan Posselt <jposselt at databay.de>
- Version
- $Id$
Definition at line 13 of file class.ilObjChatroomAccess.php.
◆ _checkAccess()
ilObjChatroomAccess::_checkAccess |
( |
|
$a_cmd, |
|
|
|
$a_permission, |
|
|
|
$a_ref_id, |
|
|
|
$a_obj_id, |
|
|
|
$a_user_id = "" |
|
) |
| |
{}
Definition at line 60 of file class.ilObjChatroomAccess.php.
References $GLOBALS.
62 if ($a_user_id ==
'') {
63 $a_user_id =
$GLOBALS[
'DIC']->user()->getId();
66 return self::checkRoomAccess($a_permission, $a_ref_id, $a_obj_id, $a_user_id);
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
◆ _checkGoto()
static ilObjChatroomAccess::_checkGoto |
( |
|
$a_target | ) |
|
|
static |
{}
Definition at line 38 of file class.ilObjChatroomAccess.php.
References $DIC.
42 if (is_string($a_target)) {
43 $t_arr = explode(
"_", $a_target);
45 if (count($t_arr) < 2 || $t_arr[0] !=
"chtr" || ((
int) $t_arr[1]) <= 0) {
49 if ($DIC->rbac()->system()->checkAccess(
"read", $t_arr[1])) {
◆ _getCommands()
static ilObjChatroomAccess::_getCommands |
( |
| ) |
|
|
static |
{}
Definition at line 23 of file class.ilObjChatroomAccess.php.
Referenced by ilObjChatroomListGUI\init().
26 $commands[] = array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"enter",
"default" =>
true);
27 $commands[] = array(
"permission" =>
"write",
"cmd" =>
"settings-general",
"lang_var" =>
"settings");
◆ canBeDelivered()
ilObjChatroomAccess::canBeDelivered |
( |
ilWACPath |
$ilWACPath | ) |
|
◆ checkRoomAccess()
static ilObjChatroomAccess::checkRoomAccess |
( |
|
$a_permission, |
|
|
|
$a_ref_id, |
|
|
|
$a_obj_id, |
|
|
|
$a_user_id |
|
) |
| |
|
static |
Definition at line 70 of file class.ilObjChatroomAccess.php.
References $GLOBALS, and IL_NO_OBJECT_ACCESS.
72 if (self::$chat_enabled === null) {
74 self::$chat_enabled = (boolean) $chatSetting->get(
'chat_enabled');
77 if (
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'write', $a_ref_id)) {
81 switch ($a_permission) {
85 $active = self::isActivated($a_ref_id, $a_obj_id, $visible);
86 $hasWriteAccess =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'write', $a_ref_id);
92 if (!$hasWriteAccess && !$active && !$visible) {
98 $hasWriteAccess =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'write', $a_ref_id);
99 if ($hasWriteAccess) {
103 $active = self::isActivated($a_ref_id, $a_obj_id);
111 return self::$chat_enabled;
const IL_NO_OBJECT_ACCESS
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
◆ isActivated()
static ilObjChatroomAccess::isActivated |
( |
|
$refId, |
|
|
|
$objId, |
|
|
& |
$a_visible_flag = null |
|
) |
| |
|
static |
◆ lookupOnline()
static ilObjChatroomAccess::lookupOnline |
( |
|
$a_obj_id | ) |
|
|
static |
- Parameters
-
- Returns
- bool
Definition at line 148 of file class.ilObjChatroomAccess.php.
References $DIC, $res, and $row.
152 $res = $DIC->database()->query(
"SELECT online_status FROM chatroom_settings WHERE object_id = " . $DIC->database()->quote($a_obj_id,
'integer'));
153 $row = $DIC->database()->fetchAssoc(
$res);
155 return (
bool)
$row[
'online_status'];
foreach($_POST as $key=> $value) $res
◆ $chat_enabled
ilObjChatroomAccess::$chat_enabled = null |
|
staticprivate |
The documentation for this class was generated from the following file: