$_cache
$_cache : \Horde_Cache
Cache object.
The Horde_Perms_Base class provides the Horde permissions system.
Copyright 2001-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
newPermission(string $name, string $type = 'matrix', array $params = null) : \Horde_Perms_Permission
Returns a new permissions object.
string | $name | The permission's name. |
string | $type | The permission type. |
array | $params | The permission parameters. |
A new permissions object.
getPermission(string $name) : \Horde_Perms_Permission
Returns an object corresponding to the named permission, with the users and other data retrieved appropriately.
string | $name | The name of the permission to retrieve. |
A permissions object.
getPermissionById(integer $cid) : \Horde_Perms_Permission
Returns an object corresponding to the given unique ID, with the users and other data retrieved appropriately.
integer | $cid | The unique ID of the permission to retrieve. |
A permissions object.
addPermission(\Horde_Perms_Permission $perm)
Adds a permission to the permissions system. The permission must first be created with newPermission(), and have any initial users added to it, before this function is called.
\Horde_Perms_Permission | $perm | The permissions object. |
removePermission(\Horde_Perms_Permission $perm, boolean $force = false)
Removes a permission from the permissions system permanently.
\Horde_Perms_Permission | $perm | The permission to remove. |
boolean | $force | Force to remove every child. |
getPermissions(mixed $permission, string $user, string $creator = null) : mixed
Finds out what rights the given user has to this object.
mixed | $permission | The full permission name of the object to check the permissions of, or the Horde_Permissions object. |
string | $user | The user to check for. |
string | $creator | The user who created the event. |
A bitmask of permissions the user has, false if there are none.
getPermissionId(\Horde_Perms_Permission $permission) : integer
Returns the unique identifier of this permission.
\Horde_Perms_Permission | $permission | The permission object to get the ID of. |
The unique id.
hasPermission(string $permission, string $user, integer $perm, string $creator = null) : boolean
Finds out if the user has the specified rights to the given object.
string | $permission | The permission to check. |
string | $user | The user to check for. |
integer | $perm | The permission level that needs to be checked for. |
string | $creator | The creator of the event |
Whether the user has the specified permissions.