[ Index ] |
|
Code source de Horde 3.1.3 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 875 lignes (28 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Perms_datatree:: (14 méthodes):
Perms_datatree()
getAvailable()
getTitle()
newPermission()
getPermission()
getPermissionById()
addPermission()
removePermission()
getPermissions()
getPermissionId()
hasPermission()
exists()
getParents()
getTree()
DataTreeObject_Permission:: (20 méthodes):
DataTreeObject_Permission()
get()
updatePermissions()
setPerm()
unsetPerm()
addUserPermission()
addGuestPermission()
addCreatorPermission()
addDefaultPermission()
addGroupPermission()
removeUserPermission()
removeGuestPermission()
removeCreatorPermission()
removeDefaultPermission()
removeGroupPermission()
getUserPermissions()
getGuestPermissions()
getCreatorPermissions()
getDefaultPermissions()
getGroupPermissions()
Classe: Perms_datatree - X-Ref
The Perms_datatree:: class provides a DataTree driver for the HordePerms_datatree() X-Ref |
Constructor. |
getAvailable($name) X-Ref |
Returns the available permissions for a given level. param: string $name The permission's name. return: array An array of available permissions and their titles. |
getTitle($name) X-Ref |
Given a permission name, returns the title for that permission by looking it up in the applications's permission api. param: string $name The permissions's name. return: string The title for the permission. |
newPermission($name) X-Ref |
Returns a new permissions object. param: string $name The permission's name. return: DataTreeObject_Permissions A new permissions object. |
getPermission($name) X-Ref |
Returns a DataTreeObject_Permission object corresponding to the named permission, with the users and other data retrieved appropriately. param: string $name The name of the permission to retrieve. |
getPermissionById($cid) X-Ref |
Returns a DataTreeObject_Permission object corresponding to the given unique ID, with the users and other data retrieved appropriately. param: integer $cid The unique ID of the permission to retrieve. |
addPermission(&$perm) X-Ref |
Adds a permission to the permissions system. The permission must first be created with Perm::newPermission(), and have any initial users added to it, before this function is called. param: DataTreeObject_Permission $perm The new perm object. |
removePermission(&$perm, $force = false) X-Ref |
Removes a permission from the permissions system permanently. param: DataTreeObject_Permission $perm The permission to remove. param: boolean $force Force to remove every child. |
getPermissions($permission, $user = null, $creator = null) X-Ref |
Finds out what rights the given user has to this object. param: mixed $permission The full permission name of the object to param: string $user The user to check for. Defaults to the current param: string $creator The user who created the object. return: mixed A bitmask of permissions, a permission value, or an array |
getPermissionId($permission) X-Ref |
Returns the unique identifier of this permission. param: DataTreeObject_Permission $permission The permission object to return: integer The unique id. |
hasPermission($permission, $user, $perm, $creator = null) X-Ref |
Finds out if the user has the specified rights to the given object. param: string $permission The permission to check. param: string $user The user to check for. param: integer $perm The permission level that needs to be checked param: string $creator The creator of the event return: boolean True if the user has the specified permissions. |
exists($permission) X-Ref |
Checks if a permission exists in the system. param: string $permission The permission to check. return: boolean True if the permission exists. |
getParents($child) X-Ref |
Returns a list of parent permissions. param: string $child The name of the child to retrieve parents for. return: array A hash with all parents in a tree format. |
getTree() X-Ref |
Returns all permissions of the system in a tree format. return: array A hash with all permissions in a tree format. |
Classe: DataTreeObject_Permission - X-Ref
Extension of the DataTreeObject class for storing Permission information inDataTreeObject_Permission($name, $type = 'matrix', $params = null) X-Ref |
The DataTreeObject_Permission constructor. Just makes sure to call the parent constructor so that the perm's name is set properly. param: string $name The name of the perm. param: string $type The permission type. param: array $params A hash with any parameters that the permission |
get($attribute) X-Ref |
Gets one of the attributes of the object, or null if it isn't defined. param: string $attribute The attribute to get. return: mixed The value of the attribute, or null. |
updatePermissions($perms) X-Ref |
Updates the permissions based on data passed in the array. param: array $perms An array containing the permissions which are to be |
setPerm($permId, $permission, $update = true) X-Ref |
FIXME: needs docs |
unsetPerm($permId, $permission, $update = true) X-Ref |
FIXME: needs docs |
addUserPermission($user, $permission, $update = true) X-Ref |
Grants a user additional permissions to this object. param: string $user The user to grant additional permissions param: constant $permission The permission (PERMS_DELETE, etc.) to add. param: boolean $update Whether to automatically update the |
addGuestPermission($permission, $update = true) X-Ref |
Grants guests additional permissions to this object. param: constant $permission The permission (PERMS_DELETE, etc.) to add. param: boolean $update Whether to automatically update the |
addCreatorPermission($permission, $update = true) X-Ref |
Grants creators additional permissions to this object. param: constant $permission The permission (PERMS_DELETE, etc.) to add. param: boolean $update Whether to automatically update the |
addDefaultPermission($permission, $update = true) X-Ref |
Grants additional default permissions to this object. param: constant $permission The permission (PERMS_DELETE, etc.) to add. param: boolean $update Whether to automatically update the |
addGroupPermission($groupId, $permission, $update = true) X-Ref |
Grants a group additional permissions to this object. param: integer $groupId The id of the group to grant additional param: constant $permission The permission (PERMS_DELETE, etc.) to add. param: boolean $update Whether to automatically update the |
removeUserPermission($user, $permission, $update = true) X-Ref |
Removes a permission that a user currently has on this object. param: string $user The user to remove the permission from. param: constant $permission The permission (PERMS_DELETE, etc.) to param: boolean $update Whether to automatically update the |
removeGuestPermission($permission, $update = true) X-Ref |
Removes a permission that guests currently have on this object. param: constant $permission The permission (PERMS_DELETE, etc.) to param: boolean $update Whether to automatically update the |
removeCreatorPermission($permission, $update = true) X-Ref |
Removes a permission that creators currently have on this object. param: constant $permission The permission (PERMS_DELETE, etc.) to param: boolean $update Whether to automatically update the |
removeDefaultPermission($permission, $update = true) X-Ref |
Removes a default permission on this object. param: constant $permission The permission (PERMS_DELETE, etc.) to param: boolean $update Whether to automatically update the |
removeGroupPermission($groupId, $permission, $update = true) X-Ref |
Removes a permission that a group currently has on this object. param: integer $groupId The id of the group to remove the param: constant $permission The permission (PERMS_DELETE, etc.) to param: boolean $update Whether to automatically update the |
getUserPermissions($perm = null) X-Ref |
Returns an array of all user permissions on this object. param: integer $perm List only users with this permission level. return: array All user permissions for this object, indexed by user. |
getGuestPermissions() X-Ref |
Returns the guest permissions on this object. return: integer The guest permissions on this object. |
getCreatorPermissions() X-Ref |
Returns the creator permissions on this object. return: integer The creator permissions on this object. |
getDefaultPermissions() X-Ref |
Returns the default permissions on this object. return: integer The default permissions on this object. |
getGroupPermissions($perm = null) X-Ref |
Returns an array of all group permissions on this object. param: integer $perm List only users with this permission level. return: array All group permissions for this object, indexed by group. |
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |