Constants

ALL

ALL

Kolab ACL speak for all permissions on a shared object.

Properties

$data

$data : string

A cache for the folder acl settings. The cache holds the permissions in horde compatible format, not in the IMAP permission format.

Type

string

$name

$name : 

TODO

Type

$_cacheVersion

$_cacheVersion : integer

Incrementing version number if cached classes change.

Type

integer

$_groups

$_groups : \Horde_Group_Base

The group handler.

Type

\Horde_Group_Base

Methods

__construct()

__construct(\Horde_Perms_Permission_Kolab_Storage  $storage, \Horde_Group_Base  $groups) 

Constructor.

Parameters

\Horde_Perms_Permission_Kolab_Storage $storage

The storage object represented by this permission instance.

\Horde_Group_Base $groups

The group handler.

setCacheVersion()

setCacheVersion(integer  $cacheVersion) 

Sets the revision number of the class.

Parameters

integer $cacheVersion

The revision number of the class.

get()

get(string  $attribute) : mixed

Gets one of the attributes of the object, or null if it isn't defined.

Parameters

string $attribute

The attribute to get.

Returns

mixed —

The value of the attribute, or null.

getName()

getName() : string

Get permission name.

Returns

string —

Permission name.

setName()

setName(string  $name) 

Set permission name

Parameters

string $name

Permission name.

getData()

getData() : array

Get permission details.

Returns

array —

Permission details.

setData()

setData(string  $data) 

Set permission details.

Parameters

string $data

Permission details.

updatePermissions()

updatePermissions(array  $perms) 

Updates the permissions based on data passed in the array.

Parameters

array $perms

An array containing the permissions which are to be updated.

setPerm()

setPerm(  $permId,   $permission,   $update = true) 

TODO

Parameters

$permId
$permission
$update

unsetPerm()

unsetPerm(  $permId,   $permission,   $update = true) 

TODO

Parameters

$permId
$permission
$update

addUserPermission()

addUserPermission(  $user, integer  $permission, boolean  $update = true) 

Grants a user additional permissions to this object.

Parameters

$user
integer $permission

The permission (DELETE, etc.) to add.

boolean $update

Whether to automatically update the backend.

addGuestPermission()

addGuestPermission(integer  $permission, boolean  $update = true) 

Grants guests additional permissions to this object.

Parameters

integer $permission

The permission (DELETE, etc.) to add.

boolean $update

Whether to automatically update the backend.

addCreatorPermission()

addCreatorPermission(integer  $permission, boolean  $update = true) 

Grants creators additional permissions to this object.

Parameters

integer $permission

The permission (DELETE, etc.) to add.

boolean $update

Whether to automatically update the backend.

addDefaultPermission()

addDefaultPermission(integer  $permission, boolean  $update = true) 

Grants additional default permissions to this object.

Parameters

integer $permission

The permission (DELETE, etc.) to add.

boolean $update

Whether to automatically update the backend.

addGroupPermission()

addGroupPermission(integer  $groupId, integer  $permission, boolean  $update = true) 

Grants a group additional permissions to this object.

Parameters

integer $groupId

The id of the group to grant additional permissions to.

integer $permission

The permission (DELETE, etc.) to add.

boolean $update

Whether to automatically update the backend.

removeUserPermission()

removeUserPermission(string  $user = null, integer  $permission = null, boolean  $update = true) 

Removes a permission that a user currently has on this object.

Parameters

string $user

The user to remove the permission from. Defaults to all users.

integer $permission

The permission (DELETE, etc.) to remove. Defaults to all permissions.

boolean $update

Whether to automatically update the backend.

removeGuestPermission()

removeGuestPermission(integer  $permission = null, boolean  $update = true) 

Removes a permission that guests currently have on this object.

Parameters

integer $permission

The permission (DELETE, etc.) to remove. Defaults to all permissions.

boolean $update

Whether to automatically update the backend.

removeCreatorPermission()

removeCreatorPermission(integer  $permission = null, boolean  $update = true) 

Removes a permission that creators currently have on this object.

Parameters

integer $permission

The permission (DELETE, etc.) to remove. Defaults to all permissions.

boolean $update

Whether to automatically update the backend.

removeDefaultPermission()

removeDefaultPermission(integer  $permission = null, boolean  $update = true) 

Removes a default permission on this object.

Parameters

integer $permission

The permission (DELETE, etc.) to remove. Defaults to all permissions.

boolean $update

Whether to automatically update the backend.

removeGroupPermission()

removeGroupPermission(integer  $groupId = null, integer  $permission = null, boolean  $update = true) 

Removes a permission that a group currently has on this object.

Parameters

integer $groupId

The id of the group to remove the permission from. Defaults to all groups.

integer $permission

The permission (DELETE, etc.) to remove. Defaults to all permissions.

boolean $update

Whether to automatically update the backend.

getUserPermissions()

getUserPermissions(integer  $perm = null) : array

Returns an array of all user permissions on this object.

Parameters

integer $perm

List only users with this permission level. Defaults to all users.

Returns

array —

All user permissions for this object, indexed by user.

getGuestPermissions()

getGuestPermissions() : integer

Returns the guest permissions on this object.

Returns

integer —

The guest permissions on this object.

getCreatorPermissions()

getCreatorPermissions() : integer

Returns the creator permissions on this object.

Returns

integer —

The creator permissions on this object.

getDefaultPermissions()

getDefaultPermissions() : integer

Returns the default permissions on this object.

Returns

integer —

The default permissions on this object.

getGroupPermissions()

getGroupPermissions(integer  $perm = null) : array

Returns an array of all group permissions on this object.

Parameters

integer $perm

List only users with this permission level. Defaults to all users.

Returns

array —

All group permissions for this object, indexed by group.

save()

save() 

Saves the current permission values from the cache to the IMAP folder.

getOwnerPermissions()

getOwnerPermissions() : integer

Returns the permissions of the owner on this object.

Returns

integer —

All owner permissions for this object.

getCurrentPermissions()

getCurrentPermissions() 

Returns the current permission of the folder and stores the values in the cache.