Jelix 1.7.18

jAcl2DbAdminUIManager
in package

Tags
author

Laurent Jouanneau

contributor

Julien Issler, Olivier Demah, Adrien Lagroy de Croutte

copyright

2008-2021 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
addUserToGroup()  : mixed
canRemoveUser()  : bool
getGroupRights()  : array<string|int, mixed>
getGroupRightsWithResources()  : array<string|int, mixed>
getUserRessourceRights()  : mixed
getUserRights()  : array<string|int, 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.
getLabel()  : mixed

Constants

Methods

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
Return values
bool

true if is safe to remove the user

getGroupRights()

public getGroupRights() : array<string|int, mixed>
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
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

getUserRessourceRights()

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

getUsersList()

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

one of FILTER_* const

$groupId : null|int = null
$userFilter : string = ''
$offset : int
$listPageSize : int = 15
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'

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
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

getLabel()

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

Search results