Group
Last updated
Last updated
count()
Number
create( document, opt ) opt = { parent: string }
Information about the group creation. JSON
expand(groupIds)
Array with the given groupIds extended with parents. [ "group1Id", "group1ParentId", "group1ParentParentId",
... "group2Id", "group2ParentId", ... ]
get( groupId, opt ) opt = { withUsers: boolean }
Group represented in JSON
gets( null, opt ) opt = { fields: obj,
asMap: boolean, asParentsMap: boolean, dangerously: boolean, baseGroup: string, name: string, }
Array of groups represented in chosen fields. JSON fields: {name: 1, _id: 1} [ { "_id": "group1._id", "name": "group1.name" }, { "_id": "group2._id", "name": "group2.name" }, ... ]
getUsersInGroup( applicationRef, groupId, opt ) otp = {
roles: array, traverse: boolean, userObj: boolean }
Array of userIds. Use all options like in the example to extend the entries with remaining user data.
Minimal input: otp = {
roles: [""], traverse: true, userObj: true }
remove(groupId)
Information about the deletion. JSON
update( groupId, data )
Information about the update. JSON
validate(groupName)
Boolean