Jelix 1.8.12

jAcl2DbAdminUIManager
in package

Tags
subpackage

jacl2db

author

Laurent Jouanneau

contributor

Julien Issler, Olivier Demah, Adrien Lagroy de Croutte

copyright

2008-2022 Laurent Jouanneau

copyright

2009 Julien Issler, 2010 Olivier Demah, 2020 Adrien Lagroy de Croutte

see
http://jelix.org
licence

http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public Licence, see LICENCE file

Table of Contents

FILTER_BY_GROUP  = 0
FILTER_GROUP_ALL_USERS  = -2
FILTER_USERS_NO_IN_GROUP  = -1
ORDER_BY_GROUPTYPE  = 4
ORDER_BY_ID  = 8
ORDER_BY_NAME  = 2
ORDER_BY_USERS  = 16
ORDER_DIRECTION_ASC  = 0
ORDER_DIRECTION_DESC  = 1
addHiddenRightsValues()  : mixed
addUserToGroup()  : mixed
canRemoveUser()  : bool
getGroupByFilter()  : mixed
getGroupRights()  : array<string|int, mixed>
Return all rights of all groups, with labels
getGroupRightsWithResources()  : array<string|int, mixed>
getGroupsCount()  : mixed
getHiddenRights()  : mixed
getRightsOfGroup()  : array<string|int, mixed>
Return all rights of a group, with labels
getUserRessourceRights()  : mixed
getUserRights()  : array<string|int, mixed>
getUsersCount()  : mixed
getUsersList()  : array<string|int, mixed>
removeGroup()  : mixed
delete a group of user.
removeGroupRightsWithResources()  : mixed
removeUserFromGroup()  : mixed
removeUserRessourceRights()  : mixed
saveGroupRights()  : mixed
Save authorizations for all groups.
saveUserRights()  : mixed
Save rights of the given user.
setRightsOnGroup()  : mixed
Save authorizations of a specific group.
getLabel()  : mixed

Constants

Methods

addHiddenRightsValues()

public addHiddenRightsValues(mixed $rights) : mixed
Parameters
$rights : mixed
Tags
Return values
mixed

addUserToGroup()

public addUserToGroup(string $login, string $groupId[, null|string $sessionUser = null ]) : mixed
Parameters
$login : string
$groupId : string
$sessionUser : null|string = null

the login name of the user who initiates the change It is mandatory although null is accepted for API compatibility. Null value is deprecated.

Tags
throws
jAcl2DbAdminUIException
Return values
mixed

canRemoveUser()

public canRemoveUser(string $login) : bool
Parameters
$login : string
Tags
Return values
bool

true if is safe to remove the user

getGroupByFilter()

public getGroupByFilter(mixed $filter, mixed $offset, mixed $listPageSize[, mixed $orderFlag = 2 ][, mixed $withUsers = true ]) : mixed
Parameters
$filter : mixed
$offset : mixed
$listPageSize : mixed
$orderFlag : mixed = 2
$withUsers : mixed = true
Tags
Return values
mixed

getGroupRights()

Return all rights of all groups, with labels

public getGroupRights() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

'groups' : list of jacl2group objects (id_aclgrp, name, grouptype, ownerlogin) 'rights' : array( => array( <id_aclgrp> => 'y' or 'n' or '')) 'rightsProperties' : array( => array( 'grp' => <id_aclsbjgrp>, 'label' =>

getGroupRightsWithResources()

public getGroupRightsWithResources(mixed $groupid) : array<string|int, mixed>
Parameters
$groupid : mixed
Tags
Return values
array<string|int, mixed>

'rightsLabels' : list of labels of each rights 'rightsWithResources': array( => array( <jacl2rights objects (id_aclsbj, id_aclgrp, id_aclres, canceled>)) 'hasRightsOnResources' : true if there are some resources 'roles_localized' : same as 'rightsLabels', deprecated 'subjects_localized' : same as 'rightsLabels', deprecated

getRightsOfGroup()

Return all rights of a group, with labels

public getRightsOfGroup(mixed $groupId) : array<string|int, mixed>
Parameters
$groupId : mixed
Tags
Return values
array<string|int, mixed>

'rights' : array( => 'y' or 'n' or '') 'rightsProperties' : array( => array( 'grp' => <id_aclsbjgrp>, 'label' =>

getUserRessourceRights()

public getUserRessourceRights(mixed $user) : mixed
Parameters
$user : mixed
Tags
Return values
mixed

getUsersCount()

public getUsersCount([mixed $groupId = null ]) : mixed
Parameters
$groupId : mixed = null
Tags
Return values
mixed

getUsersList()

public getUsersList(int $groupFilter[, null|int $groupId = null ][, string $userFilter = '' ], int $offset[, int $listPageSize = 15 ][, int $orderFlag = 2 ]) : array<string|int, mixed>
Parameters
$groupFilter : int

one of FILTER_* const

$groupId : null|int = null
$userFilter : string = ''
$offset : int
$listPageSize : int = 15
$orderFlag : int = 2

combination of ORDER_* const

Tags
Return values
array<string|int, mixed>

'users': list of objects representing users ( login, and his groups in groups) 'usersCount': total number of users

removeGroup()

delete a group of user.

public removeGroup(string $groupId[, null|string $sessionUser = null ]) : mixed
Parameters
$groupId : string

the id of the group to remove

$sessionUser : null|string = null

the login name of the user who initiate the change It is mandatory although null is accepted for API compatibility. Null value is deprecated.

Tags
throws
jAcl2DbAdminUIException
Return values
mixed

removeGroupRightsWithResources()

public removeGroupRightsWithResources(string $groupid, array<string|int, mixed> $rights) : mixed
Parameters
$groupid : string
$rights : array<string|int, mixed>

array( => (true (remove), 'on'(remove) or '' (not touch)) true or 'on' means 'to remove'

Tags
Return values
mixed

removeUserFromGroup()

public removeUserFromGroup(string $login, string $groupId[, null|string $sessionUser = null ]) : mixed
Parameters
$login : string

the login of the user to remove from the given group

$groupId : string

the group name from which the user should be removed

$sessionUser : null|string = null

the login name of the user who initiates the change It is mandatory although null is accepted for API compatibility. Null value is deprecated.

Tags
throws
jAcl2DbAdminUIException
Return values
mixed

removeUserRessourceRights()

public removeUserRessourceRights( $user, mixed $rights) : mixed
Parameters
$user :
$rights : mixed
Tags
Return values
mixed

saveGroupRights()

Save authorizations for all groups.

public saveGroupRights(array<string|int, mixed> $rights[, string $sessionUser = null ]) : mixed

Only authorizations on given subjects are changed. Existing authorizations not given in parameters are deleted from the corresponding group (i.e: marked as inherited).

If authorizations of a group are missing, all authorizations for this group are deleted.

Parameters
$rights : array<string|int, mixed>

array(<id_aclgrp> => array( <id_aclsbj> => (bool, 'y', 'n' or '')))

$sessionUser : string = null

the user login who initiates the change. It is mandatory although null is accepted for API compatibility. Null value is deprecated

Tags
see
jAcl2DbManager::setRightsOnGroup()
Return values
mixed

saveUserRights()

Save rights of the given user.

public saveUserRights(string $login, array<string|int, mixed> $userRights[, null|string $sessionUser = null ]) : mixed

Only rights on given subjects are changed. Existing rights not given in parameters are deleted from the private group of the user (i.e: marked as inherited).

Rights with resources are not changed.

Parameters
$login : string

the login of the user on who rights will be changed

$userRights : array<string|int, mixed>

list of rights key=subject, value=false(inherit)/''(inherit)/true(add)/'y'(add)/'n'(remove)

$sessionUser : null|string = null

the login name of the user who initiate the change It is mandatory although null is accepted for API compatibility. Null value is deprecated.

Tags
throws
jAcl2DbAdminUIException
Return values
mixed

setRightsOnGroup()

Save authorizations of a specific group.

public setRightsOnGroup(array<string|int, mixed> $rights, string $groupId[, string $sessionUser = null ]) : mixed

Only authorizations on given subjects are changed. Existing authorizations not given in parameters are deleted from the corresponding group (i.e: marked as inherited).

Parameters
$rights : array<string|int, mixed>

array( <id_aclsbj> => (bool, 'y', 'n' or ''))

$groupId : string
$sessionUser : string = null

the user login who initiates the change. It is mandatory although null is accepted for API compatibility. Null value is deprecated

Tags
see
jAcl2DbManager::setRightsOnGroup()
Return values
mixed

getLabel()

protected getLabel(mixed $id, mixed $labelKey) : mixed
Parameters
$id : mixed
$labelKey : mixed
Tags
Return values
mixed

Search results