Inheritance diagram for ilObjGroupAccess:
Collaboration diagram for ilObjGroupAccess:Public Member Functions | |
| _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) | |
| _getCommands () | |
| get commands | |
Definition at line 35 of file class.ilObjGroupAccess.php.
| ilObjGroupAccess::_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)
| string | $a_cmd command (not permission!) | |
| string | $a_permission permission | |
| int | $a_ref_id reference id | |
| int | $a_obj_id object id | |
| int | $a_user_id user id (if not provided, current user is taken) |
Reimplemented from ilObjectAccess.
Definition at line 49 of file class.ilObjGroupAccess.php.
References $ilAccess, $ilUser, $lng, $rbacsystem, and ilObjGroup::_isMember().
{
global $ilUser, $lng, $rbacsystem, $ilAccess;
if ($a_user_id == "")
{
$a_user_id = $ilUser->getId();
}
switch ($a_cmd)
{
case "info":
include_once 'class.ilObjGroup.php';
if(ilObjGroup::_isMember($a_user_id,$a_ref_id))
{
$ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt("info_is_member"));
}
else
{
$ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt("info_is_not_member"));
}
break;
case "join":
include_once 'class.ilObjGroup.php';
if(ilObjGroup::_isMember($a_user_id,$a_ref_id))
{
return false;
}
break;
}
switch ($a_permission)
{
}
return true;
}
Here is the call graph for this function:| ilObjGroupAccess::_getCommands | ( | ) |
get commands
this method returns an array of all possible commands/permission combinations
example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );
Reimplemented from ilObjectAccess.
Definition at line 102 of file class.ilObjGroupAccess.php.
Referenced by ilObjGroupListGUI::init().
{
$commands = array
(
array("permission" => "read", "cmd" => "view", "lang_var" => "show",
"default" => true),
array("permission" => "join", "cmd" => "join", "lang_var" => "join"),
array("permission" => "write", "cmd" => "edit", "lang_var" => "edit")
);
return $commands;
}
Here is the caller graph for this function:
1.7.1