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 | |
_checkGoto ($a_target) | |
check whether goto script will succeed |
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 $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; }
ilObjGroupAccess::_checkGoto | ( | $ | a_target | ) |
check whether goto script will succeed
Reimplemented from ilObjectAccess.
Definition at line 118 of file class.ilObjGroupAccess.php.
{ global $ilAccess; $t_arr = explode("_", $a_target); if ($t_arr[0] != "grp" || ((int) $t_arr[1]) <= 0) { return false; } if ($ilAccess->checkAccess("read", "", $t_arr[1]) || $ilAccess->checkAccess("visible", "", $t_arr[1])) { return true; } return false; }
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; }