Access Control Web Service

From AlfrescoWiki

Jump to: navigation, search

Back to Alfresco Content Management Web Services.

Introduced in 1.2.

Contents

[edit] Change Log

[edit] Data Types

[edit] AccessStatus

Enumerated value that indicates the access state relating to a permission on a particular reference.

Values:

  • ACEPTED
  • DECLINED

[edit] ACE

An Access Control Entry (ACE) contains the information about the permission and how it relates to an authority.

Under certain circumstances an ACE can be used as a filter in a method call. When this happens, null values are interpreted to mean match all otherwise the values are matched exactly.

  • xsd:string authority - the authority to which this permission applies
  • xsd:string permission - the string that identifies the permission
  • AccessStatus accessStatus - indicates whether the permission is allowed or denied

[edit] ACL

An Access Control List (ACL) is a list of ACE's qualified by the reference that they relate to.

  • Reference reference - the reference to which the permissions relate
  • xsd:boolean inheritPermissions - indicates whether the reference inherits permissions from its parents
  • ACE[] aces - the list of ACE's that relate to the reference

[edit] GetPermissionsResult

Represents the result from a call to the getPermissions method.

  • Reference reference - the reference
  • xsd:string[] permissions - the list of settable permissions.

[edit] GetClassPermissionsResult

Represents the result from a call to the getClassPermissions method.

  • xsd:string className - the qualified class name
  • xsd:string[] permissions - the list of settable permissions.

[edit] HasPermissionsResult

Represents the result from the hasPermissions method.

  • Reference reference - the reference
  • xsd:string permission - the permission name
  • AccessStatus accessStatus - indicates whether the currently authenticated user has the permission or not

[edit] OwnerResult

Represents the result for a call to getOwners or setOwners methods.

  • Reference reference - the reference
  • xsd:string owner - the owner user name

[edit] AuthorityFilter

Used to filter get authority results.

[edit] SiblingAuthorityFilter

Used to filter getChildAuthorities and getParentAuthorities method calls.

  • AuthorityType type - the authority type
  • boolean immediate - indicates whether only the immediate children/parents should be returned

[edit] Methods

[edit] getACLs

Get the list of the ACL's for a reference. An ACE can be provided to use as a filter for the list of ACE's in the returned ACL. If no ACE is provided all ACE's will be returned in the ACL.

ACL[] getACLs(Predicate predicate, ACE filter)

Parameters:

  • predicate - the predicate
  • filter - the ACE used to filter the ACE's returned in the ACL

Returns:

  • a list of ACL's

[edit] addACEs

Adds a number of ACE's to a collection of references.

ACL[] addACEs(Predicate predicate, ACE[] aces)

Parameters:

  • predicate - the predicate
  • aces - a list of ACE's to add to each reference

Returns:

  • a list containing the ACL's of the modified references

[edit] removeACEs

Removes ACE's from a collection of references. If no ACE's are specified then all permissions are removed.

ACL[] removeACEs(Predicate predicate, ACE[] aces)

Parameters:

  • predicate - the predicate
  • aces - list of ACE's to remove from each of the references.

Returns:

  • a list containing the ACL's for the references modified

[edit] getPermissions

Gets a list of the settable permissions for a set of references.

GetPermissionsResult[] getPermissions(Predicate predicate)

Parameters:

  • predicate - the predicate

Returns:

  • a list of results that contains the permissions for each of the references.

[edit] getClassPermissions

Gets a list of the settable permissions for a list of classes. A class is either a type or an aspect.

GetClassPermissionsResult[] getPermissions(xsd:string[] classNames)

Parameters:

  • className - a list of qualified class name

Returns:

  • a list of results that contains the permissions for each of the classes.

[edit] hasPermissions

Determines whether the currently authenticated user has the permissions on the each of the references.

HasPermissionsResult[] hasPermissions(Predicate predicate, xsd:string[] permissions)

Parameters:

  • predicate - a predicate to a collection of references that we want to test for permissions
  • permissions - a list of permissions that we want to test each reference for

Results:

  • a list indicating which permissiong each reference has

[edit] setInheritPermission

Set the inherit permission property of a set of references.

ACL[] setInheritPermission(Predicate predicate, xsd:boolean inheritPermission)

Parameters:

  • predicate - the predicate
  • inheritPermission - if true then all references specified by the predicate will inherit permissions from their parents.

Return:

  • a list containing the ACL's for the modified references.

[edit] getOwners

Gets the current owners.

OwnerResult[] getOwners(Predicate predicate)

Prameters:

  • predicate - the predicate

Returns:

  • a list of the references with their owners

[edit] setOwners

Sets the owners.

OwnerResult[] setOwners(Predicate predicate, xsd:string owner)

Parameters:

  • predicate - the predicate
  • owner - the name of the new owner

Returns:

  • a list of the references with their new owners