Zimlet JavaScript API Reference - ZmAccessControlList

Class ZmAccessControlList


An access control list is a collection of access control entries (ACEs). Each entry contains information about a certain permission applied by the current user to another user or users for a particular type of action. So far, there are two types of rights that are managed in this way:

  • viewFreeBusy - governs whether other users may view this user's free/busy information
  • invite - determines whether an invite from other users will automatically create a tentative appointment on this user's calendar
Note: that shared organizers (ZmShare) manage rights (read/write/manage) in their own way.

Defined in: ZmAccessControlList.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates an empty access control list (ACL).
Method Summary
Method Attributes Method Name and Description
 
add(ace)
Adds the entry to the ACL.
 
Cleans up the ACL.
 
Gets the access control entry by grantee type.
 
Gets the access control entry by right.
 
getGrantees(right)
Gets the grantees.
 
Gets the grantees info.
 
Gets the grantee type.
 
grant(aces, callback, batchCmd)
Grants permissions on the access control entries.
 
remove(ace)
Removes the entry to the ACL.
 
revoke(aces, callback, batchCmd)
Revokes and denies permissions the access control entries.
<static>  
ZmAccessControlList.sortByGrantee(a, b)
Sorts the ACL by grantee.
 
Returns a string representation of the object.
 
update(ace, removeEnty)
Updates the entry to the ACL.
Class Detail
ZmAccessControlList(aces)
Creates an empty access control list (ACL).
Author: Conrad Damon.
Parameters:
{Array} aces
the list of ZmAccessControlEntry objects
Method Detail
add(ace)
Adds the entry to the ACL.
Parameters:
{ZmAccessControlEntry} ace
the entry to add

cleanup()
Cleans up the ACL.

{Array} getACLByGranteeType(right, gt)
Gets the access control entry by grantee type.
Parameters:
{String} right
the right
{constant} gt
the grantee type (see ZmSetting.ACL_ constants)
Returns:
{Array} an array of ZmAccessControlEntry objects

{ZmAccessControlEntry} getACLByRight(right)
Gets the access control entry by right.
Parameters:
{String} right
the right
Returns:
{ZmAccessControlEntry} the entry

{Array} getGrantees(right)
Gets the grantees.
Parameters:
{String} right
the right
Returns:
{Array} an array of grantees

{Array} getGranteesInfo(right)
Gets the grantees info.
Parameters:
{String} right
the right
Returns:
{Array} an array of grantree info objects (obj.grantee, obj.zid)

{constant} getGranteeType(right)
Gets the grantee type.
Parameters:
{String} right
the right
Returns:
{constant} the grantee type (see ZmSetting.ACL_ constants)
See:
ZmSetting

grant(aces, callback, batchCmd)
Grants permissions on the access control entries.
Parameters:
{Array} aces
an array of ZmAccessControlEntry objects
{AjxCallback} callback
the callback
{Boolean} batchCmd
true to submit as a batch command

remove(ace)
Removes the entry to the ACL.
Parameters:
{ZmAccessControlEntry} ace
the entry to remove

revoke(aces, callback, batchCmd)
Revokes and denies permissions the access control entries.
Parameters:
{Array} aces
an array of ZmAccessControlEntry objects
{AjxCallback} callback
the callback
{Boolean} batchCmd
true to submit as a batch command

<static> {int} ZmAccessControlList.sortByGrantee(a, b)
Sorts the ACL by grantee.
Parameters:
{Hash} a
grantee "a"
{String} a.grantee
the grantee
{Hash} b
grantee "b"
{Hash} b.grantee
grantee "b"
Returns:
{int} 0 if "a" and "b" are the same; 1 if "a" is before "b"; -1 if "b" is before "a"

{String} toString()
Returns a string representation of the object.
Returns:
{String} a string representation of the object

update(ace, removeEnty)
Updates the entry to the ACL.
Parameters:
{ZmAccessControlEntry} ace
the entry to update
{Boolean} removeEnty
not used

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:37 GMT-0400 (EDT)