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 61 of file class.ilObjChatroomAccess.php.
References $GLOBALS.
63 if ($a_user_id ==
'') {
64 $a_user_id =
$GLOBALS[
'DIC']->user()->getId();
67 return self::checkRoomAccess($a_permission, $a_ref_id, $a_obj_id, $a_user_id);
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
◆ _checkGoto()
static ilObjChatroomAccess::_checkGoto |
( |
|
$a_target | ) |
|
|
static |
{}
Definition at line 38 of file class.ilObjChatroomAccess.php.
References ilChatroom\checkUserPermissions().
40 if (is_string($a_target)) {
41 $t_arr = explode(
"_", $a_target);
43 if (count($t_arr) < 2 || $t_arr[0] !=
'chtr' || ((
int) $t_arr[1]) <= 0) {
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
◆ _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 71 of file class.ilObjChatroomAccess.php.
References $GLOBALS, IL_NO_OBJECT_ACCESS, and language().
73 if (self::$chat_enabled === null) {
75 self::$chat_enabled = (boolean) $chatSetting->get(
'chat_enabled');
78 if (
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'write', $a_ref_id)) {
82 switch ($a_permission) {
86 $active = self::isActivated($a_ref_id, $a_obj_id, $visible);
87 $hasWriteAccess =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'write', $a_ref_id);
93 if (!$hasWriteAccess && !$active && !$visible) {
99 $hasWriteAccess =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'write', $a_ref_id);
100 if ($hasWriteAccess) {
104 $active = self::isActivated($a_ref_id, $a_obj_id);
112 return self::$chat_enabled;
const IL_NO_OBJECT_ACCESS
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
◆ 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 149 of file class.ilObjChatroomAccess.php.
References $DIC, and $res.
153 $res = $DIC->database()->query(
"SELECT online_status FROM chatroom_settings WHERE object_id = " . $DIC->database()->quote($a_obj_id,
'integer'));
154 $row = $DIC->database()->fetchAssoc(
$res);
156 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: