The Horde_Permission constructor.
Horde_Permission
Horde_Permission
(string $name, [string $type = 'matrix'], [array $params = null])
-
string
$name: The name of the perm.
-
string
$type: The permission type.
-
array
$params: A hash with any parameters that the permission type needs.
Grants creators additional permissions to this object.
void
addCreatorPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants additional default permissions to this object.
void
addDefaultPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants a group additional permissions to this object.
void
addGroupPermission
(integer $groupId, constant $permission, [boolean $update = true])
-
integer
$groupId: The id of the group to grant additional permissions to.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants guests additional permissions to this object.
void
addGuestPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Grants a user additional permissions to this object.
void
addUserPermission
(string $user, constant $permission, [boolean $update = true])
-
string
$user: The user to grant additional permissions to.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to add.
-
boolean
$update: Whether to automatically update the backend.
Gets one of the attributes of the object, or null if it isn't defined.
mixed
get
(string $attribute)
-
string
$attribute: The attribute to get.
Redefined in descendants as:
Returns the creator permissions on this object.
integer
getCreatorPermissions
()
Get permission details
void
getData
()
Returns the default permissions on this object.
integer
getDefaultPermissions
()
Returns an array of all group permissions on this object.
array
getGroupPermissions
([integer $perm = null])
-
integer
$perm: List only users with this permission level. Defaults to all users.
Returns the guest permissions on this object.
integer
getGuestPermissions
()
Get permission name
void
getName
()
Returns an array of all user permissions on this object.
array
getUserPermissions
([integer $perm = null])
-
integer
$perm: List only users with this permission level. Defaults to all users.
Removes a permission that creators currently have on this object.
void
removeCreatorPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a default permission on this object.
void
removeDefaultPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a permission that a group currently has on this object.
void
removeGroupPermission
(integer $groupId, constant $permission, [boolean $update = true])
-
integer
$groupId: The id of the group to remove the permission from.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a permission that guests currently have on this object.
void
removeGuestPermission
(constant $permission, [boolean $update = true])
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Removes a permission that a user currently has on this object.
void
removeUserPermission
(string $user, constant $permission, [boolean $update = true])
-
string
$user: The user to remove the permission from.
-
constant
$permission: The permission (PERMS_DELETE, etc.) to remove.
-
boolean
$update: Whether to automatically update the backend.
Set permission id
void
setData
( $data, string $id)
-
string
$id: Permission ID
-
$data
Set permission name
void
setName
(string $name)
-
string
$name: Permission name
FIXME: needs docs
void
setPerm
( $permId, $permission, [ $update = true])
-
$permId
-
$permission
-
$update
FIXME: needs docs
void
unsetPerm
( $permId, $permission, [ $update = true])
-
$permId
-
$permission
-
$update
Updates the permissions based on data passed in the array.
void
updatePermissions
(array $perms)
-
array
$perms: An array containing the permissions which are to be updated.