GroupManagement
Extends:
User API for groups and rights.
Groups are stored per user. This means that two users can own a group with the same identifier. A couple (owner, group) is needed to uniquely identify a group inside a group management service. The triplet (deploymentId, owner, group) is actually needed to fully qualify a group outside of the scope of this service.
Static Member Summary
Static Public Members | ||
public static get |
Get default deployment id associated to GroupManagement service |
Method Summary
Public Methods | ||
public |
addMe(objectPattern: {"group": *, "owner": *}): * Adds me to a group |
|
public |
addUser(objectPattern: {"user": *, "group": *, "owner": *}): * Adds a user to a group |
|
public |
addUsers(objectPattern: {"users": *, "group": *, "owner": *}): * Adds users to a group |
|
public |
allGroups(objectPattern: {"owner": *}): * Lists my owned groups, with details |
|
public |
createGroup(objectPattern: {"group": *, "groupName": *, "owner": *}): * Creates a group |
|
public |
delGroup(objectPattern: {"group": *, "owner": *}): * Removes a group |
|
public |
delUser(objectPattern: {"user": *, "group": *, "owner": *}): * Removes a user from a group |
|
public |
delUsers(objectPattern: {"users": *, "group": *, "groupName": *, "owner": *}): * Removes users from a group |
|
public |
exists(objectPattern: {"group": *, "owner": *}): * Tests for a group's existence Returns whether a group exists or not. |
|
public |
grant(objectPattern: {"resource": *, "group": *, "owner": *, "action": *}): * Grants a right to a group |
|
public |
groupUsers(objectPattern: {"group": *, "owner": *}): * Lists the group users |
|
public |
groups(objectPattern: {"owner": *}): * Lists my owned groups |
|
public |
listGrants(objectPattern: {"group": *, "owner": *}): * Lists rights for a group |
|
public |
listPresences(objectPattern: {"group": *, "owner": *}): * Lists presences for a group |
|
public |
memberOf(objectPattern: {"hardFail": *, "group": *, "owner": *}): * Tests membership |
|
public |
mgrant(objectPattern: {"resource": *, "actions": *, "group": *, "owner": *}): * Grants rights to a group |
|
public |
mrevoke(objectPattern: {"resource": *, "actions": *, "group": *, "owner": *}): * Revokes rights for a group |
|
public |
myGroups(objectPattern: {"owner": *}): * Lists the groups I am part of |
|
public |
revoke(objectPattern: {"resource": *, "group": *, "owner": *, "action": *}): * Revokes a right for a group |
Static Public Members
Public Methods
public addMe(objectPattern: {"group": *, "owner": *}): * source
Adds me to a group
Adds me (the caller) to a group. This verb exists so that group owners may grant the right to join their groups without granting the right to add other users to those groups. The 'user' field is implicitly set to the current user's key.
Params:
Name | Type | Attribute | Description |
objectPattern | {"group": *, "owner": *} |
|
Return:
* |
public addUser(objectPattern: {"user": *, "group": *, "owner": *}): * source
Adds a user to a group
Adds the given user to the given group. Addition may fail if the given group does not already exist.
Params:
Name | Type | Attribute | Description |
objectPattern | {"user": *, "group": *, "owner": *} |
|
Return:
* |
public addUsers(objectPattern: {"users": *, "group": *, "owner": *}): * source
Adds users to a group
Params:
Name | Type | Attribute | Description |
objectPattern | {"users": *, "group": *, "owner": *} |
|
Return:
* |
public allGroups(objectPattern: {"owner": *}): * source
Lists my owned groups, with details
Returns the whole list of groups owned by the current user, with their members
Params:
Name | Type | Attribute | Description |
objectPattern | {"owner": *} |
|
Return:
* |
public createGroup(objectPattern: {"group": *, "groupName": *, "owner": *}): * source
Creates a group
Creates a group owned by the current user. Group creation may fail if the group already exists.
Params:
Name | Type | Attribute | Description |
objectPattern | {"group": *, "groupName": *, "owner": *} |
|
Return:
* |
public delGroup(objectPattern: {"group": *, "owner": *}): * source
Removes a group
Removes the given group owned by the current user or the given owner. Also removes all grants to that group.
Params:
Name | Type | Attribute | Description |
objectPattern | {"group": *, "owner": *} |
|
Return:
* |
public delUser(objectPattern: {"user": *, "group": *, "owner": *}): * source
Removes a user from a group
Params:
Name | Type | Attribute | Description |
objectPattern | {"user": *, "group": *, "owner": *} |
|
Return:
* |
public delUsers(objectPattern: {"users": *, "group": *, "groupName": *, "owner": *}): * source
Removes users from a group
Params:
Name | Type | Attribute | Description |
objectPattern | {"users": *, "group": *, "groupName": *, "owner": *} |
|
Return:
* |
public exists(objectPattern: {"group": *, "owner": *}): * source
Tests for a group's existence
Returns whether a group exists or not.
Params:
Name | Type | Attribute | Description |
objectPattern | {"group": *, "owner": *} |
|
Return:
* |
public grant(objectPattern: {"resource": *, "group": *, "owner": *, "action": *}): * source
Grants a right to a group
The granting API does not do any check when storing permissions. In particular when granting rights on a verb and resource of another API, the existence of said verb and resource is not checked.
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "group": *, "owner": *, "action": *} |
|
Return:
* |
public groupUsers(objectPattern: {"group": *, "owner": *}): * source
Lists the group users
Returns the whole list of users configured inside the given group.
Params:
Name | Type | Attribute | Description |
objectPattern | {"group": *, "owner": *} |
|
Return:
* |
public groups(objectPattern: {"owner": *}): * source
Lists my owned groups
Returns the whole list of groups owned by the current user
Params:
Name | Type | Attribute | Description |
objectPattern | {"owner": *} |
|
Return:
* |
public listGrants(objectPattern: {"group": *, "owner": *}): * source
Lists rights for a group
This API lists explicitly configured rights. Effective rights include configured rights, implicit rights and inherited rights.
Params:
Name | Type | Attribute | Description |
objectPattern | {"group": *, "owner": *} |
|
Return:
* |
public listPresences(objectPattern: {"group": *, "owner": *}): * source
Lists presences for a group
Returns the list of members of the given groups, along with their actual and current presence on the zetapush server. The current implementation does not include information about the particular devices users are connected with. If a user is connected twice with two different devices, two identical entries will be returned.
Params:
Name | Type | Attribute | Description |
objectPattern | {"group": *, "owner": *} |
|
Return:
* |
public memberOf(objectPattern: {"hardFail": *, "group": *, "owner": *}): * source
Tests membership
Tests whether I (the caller) am a member of the given group. This verb exists so that users can determine if they are part of a group without being granted particular rights. The 'user' field is implicitly set to the current user's key.
Params:
Name | Type | Attribute | Description |
objectPattern | {"hardFail": *, "group": *, "owner": *} |
|
Return:
* |
public mgrant(objectPattern: {"resource": *, "actions": *, "group": *, "owner": *}): * source
Grants rights to a group
Grant several rights at once.
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "actions": *, "group": *, "owner": *} |
|
Return:
* |
public mrevoke(objectPattern: {"resource": *, "actions": *, "group": *, "owner": *}): * source
Revokes rights for a group
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "actions": *, "group": *, "owner": *} |
|
Return:
* |
public myGroups(objectPattern: {"owner": *}): * source
Lists the groups I am part of
Returns the whole list of groups the current user is part of. Groups may be owned by anyone, including the current user.
Params:
Name | Type | Attribute | Description |
objectPattern | {"owner": *} |
|
Return:
* |
public revoke(objectPattern: {"resource": *, "group": *, "owner": *, "action": *}): * source
Revokes a right for a group
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "group": *, "owner": *, "action": *} |
|
Return:
* |