Methods
__construct()
__construct()
deprecated |
[2012-07-24] class was renamed to cPermission |
Returns all groups of a user
getGroupsForUser(string $userId) : array
Inherited
inherited_from |
\cPermission::getGroupsForUser() |
Parameters
$userId
string
Returns
array
List of group ids
Returns the id of an action.
getIDForAction(string | int $action) : int
Inherited
If passed action is numeric, it will returned directly.
inherited_from |
\cPermission::getIDForAction() |
Parameters
$action
string
int
Returns
int
Returns the id of an area.
getIDForArea(string | int $area) : int
Inherited
If passed area is numeric, it will returned directly.
inherited_from |
\cPermission::getIDForArea() |
Parameters
$area
string
int
Returns
int
getParentAreaId()
getParentAreaId($area)
Inherited
inherited_from |
\cPermission::getParentAreaId() |
Parameters
$area
Checks if a user has access rights for a specific client.
hasClientPermission(int $iClient, object $oUser) : bool
Inherited
inherited_from |
\cPermission::hasClientPermission() |
Parameters
$iClient
int
idclient to check, or false for the current client
$oUser
object
User object to check against, or false for the
current user
Returns
bool
Checks if user has permissions tp passed perm.
have_perm(string $p) : bool
Inherited
- Sysadmin has allways permission
- Client admin has allways permission
inherited_from |
\cPermission::have_perm() |
Parameters
$p
string
Permissions (comma separated list of perms) to check
Returns
bool
have_perm_area_action()
have_perm_area_action($area, $action)
Inherited
inherited_from |
\cPermission::have_perm_area_action() |
Parameters
$area
$action
have_perm_area_action_anyitem()
have_perm_area_action_anyitem($area, $action)
Inherited
inherited_from |
\cPermission::have_perm_area_action_anyitem() |
Parameters
$area
$action
have_perm_area_action_item()
have_perm_area_action_item($area, $action, $itemid)
Inherited
inherited_from |
\cPermission::have_perm_area_action_item() |
Parameters
$area
$action
$itemid
have_perm_client()
have_perm_client($p)
Inherited
inherited_from |
\cPermission::have_perm_client() |
Parameters
$p
have_perm_client_lang()
have_perm_client_lang($client, $lang)
Inherited
inherited_from |
\cPermission::have_perm_client_lang() |
Parameters
$client
$lang
Checks if an item have any perms
have_perm_item(string | int $mainarea, int $itemid) : bool
Inherited
inherited_from |
\cPermission::have_perm_item() |
Parameters
$mainarea
string
int
$itemid
int
Returns
bool
Checks if the given user has an admin permission
isClientAdmin(integer $iClient, object $oUser) : bool
Inherited
inherited_from |
\cPermission::isClientAdmin() |
Parameters
$iClient
integer
idclient to check
$oUser
object
User object to check against
Returns
bool
Checks if the given group has access permission for a client
isClientGroup(int $iClient, object $oGroup) : bool
Inherited
inherited_from |
\cPermission::isClientGroup() |
Parameters
$iClient
int
idclient to check
$oGroup
object
Group object to check against
Returns
bool
Checks if the given user has access permission for a client
isClientUser(int $iClient, object $oUser) : bool
Inherited
inherited_from |
\cPermission::isClientUser() |
Parameters
$iClient
int
idclient to check
$oUser
object
User object to check against
Returns
bool
Checks if the given user has sysadmin permission
isSysadmin(object $oUser)
Inherited
inherited_from |
\cPermission::isSysadmin() |
Parameters
$oUser
object
User object to check against
Loads all permissions of groups where current logged in user is a member
and saves them in session.
load_permissions(bool $force) : string
Inherited
inherited_from |
\cPermission::load_permissions() |
Parameters
$force
bool
Flag to force loading, event if they were ccached
before
Returns
string
Returns diffrent values, depending on state:
'1' (string) if permissions couldn't loaded
'3' (string) if permissions were successfull loaded
Loads all permissions for a specific user or group.
load_permissions_for_user(string $user)
Inherited
Stores area rights in global variable $area_rights.
Stores item rights in global variable $item_rights.
inherited_from |
\cPermission::load_permissions_for_user() |
Parameters
showareas()
showareas($mainarea)
Inherited
inherited_from |
\cPermission::showareas() |
Parameters
$mainarea
Checks if the given object is a user object.
_checkUserObject(object $oUser) : object
Inherited
If oUser is false, initialize the object from the currently logged in
user. If oUser is not an object of the class cApiUser, throw an exception.
inherited_from |
\cPermission::_checkUserObject() |
Parameters
Exceptions
Returns
object
Properties
$actioncache : array
Inherited
inherited_from |
\cPermission::$$actioncache |
$areacache : array
Inherited
inherited_from |
\cPermission::$$areacache |
$classname : string
Inherited
inherited_from |
\cPermission::$$classname |
$db : \cDb
Inherited
inherited_from |
\cPermission::$$db |