You are here

getCapabilities

getCapabilities(person) returns a hash of the specified user's capabilities.

Parameters

person
A node representing the user whose capabilities are to be fetched.

Returns

A <string, boolean> hash containing the capabilities of the user. For example, isMutable, isGuest, isAdmin and their boolean states will be returned.

Example

The following code snippet returns a hash containing the capabilities of the admin user:

var person = people.getPerson("admin");

if (person){
    model.caps = people.getCapabilities(person);
}

The capabilities returned would be as follows:

isMutable: TRUE

isGuest: FALSE

isAdmin: TRUE  

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.