Click or drag to resize

UserGroupSelectionServicesGetUserGroupsForPages Method


Retrieves the collection of Users or User Groups based on the given Pages and Transition

This operations is mainly used for retrieving the list of Users or Group for Page assignment, inside or outside of Workflow transition.

For User Groups retrieval scenario:

If Page is not in Workflow, it can be assigned to any User Groups, therefore all User Groups are returned.

If Page is in Workflow, and the assignment is happening through Transition (trantionId provided), then the Transition's Target Group is returned.

If Page is in Workflow, and the assignment is not through Transition (transitionId not provided), then the Current Group of the Workflow State is returned.

For Users retrieval scenario:

If Page is not in Workflow, it can be assigned to any Users, therefore all Users are returned.

If Page is in Workflow, and the assignment is happening through Transition (transitionId provided), then the Users that belong to the Transition's Target Group are returned.

If Page is in Workflow, and the assignment is not through Transition (transitionId not provided), then the Users that belong to the Current Group of the Workflow State are returned.

The result is combination of all Users/Users Groups each Page allows.

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.5.94
Syntax
public XHRServiceResponseGeneric<UserGroupSelectionData> GetUserGroupsForPages(
	string pageId,
	string transitionId,
	bool getGroups
)

Parameters

pageId
Type: SystemString
Id of the Pages to retrieve Users/User Groups for. "|" delimited to multiple Pages.
transitionId
Type: SystemString
Id of the Transition to that be used to advance and assign the Page
getGroups
Type: SystemBoolean
Whether to retrieve list of User Groups or Users

Return Value

Type: XHRServiceResponseGenericUserGroupSelectionData

Collection of basic information of either Users and User Groups

Examples
Sample JSON return - Users
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "groupName": "",
        "groups": [],
        "users": [{
            "name": "abusbin",
            "active": false,
            "email": "",
            "lastLogin": null,
            "userId": "INGENIUX\\abusbin"
        }, {
            "name": "author",
            "active": false,
            "email": "",
            "lastLogin": "2014-01-20",
            "userId": "ingeniux\\author"
        }, {
            "name": "t",
            "active": false,
            "email": "t@i.com",
            "lastLogin": null,
            "userId": "t"
        }, {
            "name": "Turtle Master",
            "active": false,
            "email": "awang@ingeniux.com",
            "lastLogin": "2014-01-27",
            "userId": "INGENIUX\\awang"
        }]
    }
}
Examples
Sample JSON return - User Groups
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "groupName": null,
        "groups": [{
            "name": "Administrators",
            "active": true,
            "groupId": "UserGroup\/1",
            "id": "UserGroup\/1",
            "userRights": [32, 0]
        }, {
            "name": "Authors",
            "active": true,
            "groupId": "UserGroups\/1",
            "id": "UserGroups\/1",
            "userRights": [1355393, 511]
        }],
        "users": []
    }
}
Remarks

If any Page with the provided Ids doesn't exists, returns error status, that contains all invalid Page Ids

See Also