Constructor
new groups(alogger)
Parameters:
Name |
Type |
Description |
alogger |
object
|
Logger to be used for output of class methods (usually req.app.logger) |
- Source:
Methods
addGroupforOrganization(groupName, orgId, callback)
Parameters:
Name |
Type |
Description |
groupName |
string
|
Name of the group as group should be displayed in UI |
orgId |
integer
|
organization id the group should be added for |
callback |
function
|
success, true or false |
- Source:
assignGroupsToUser(groupsArray, basedataId, callback)
Parameters:
Name |
Type |
Description |
groupsArray |
Array
|
Array of new groups to be added |
basedataId |
integer
|
basedata id the new groups shall be added for |
callback |
function
|
true or false (success) |
- Source:
deleteGroup(gId, callback)
Deletes a group from core database
Parameters:
Name |
Type |
Description |
gId |
integer
|
group ID of group to be deleted |
callback |
function
|
success, true or false |
- Source:
doesGroupExistForOrganization(groupName, orgId, callback)
Parameters:
Name |
Type |
Description |
groupName |
string
|
Name of the group |
orgId |
integer
|
organization id |
callback |
function
|
success true -> exists, false -> not existing, null -> error in query |
- Source:
getGroupForId(gId, callback)
Loads a group for a given group id
Parameters:
Name |
Type |
Description |
gId |
integer
|
group id to load data for from core database |
callback |
function
|
row or null |
- Source:
getListOfGroups(callback)
Returns list of all existing groups
Parameters:
Name |
Type |
Description |
callback |
function
|
rows |
- Source:
getListOfGroupsForBaseData(basedataId, callback)
Returns rows with groups for given basedata id
Parameters:
Name |
Type |
Description |
basedataId |
integer
|
basedata id groups should be loaded for |
callback |
function
|
rows or null |
- Source:
getListOfGroupsForOrganization(orgId, callback)
Returns rows with groups for given organization id
Parameters:
Name |
Type |
Description |
orgId |
integer
|
Organization id groups to be loaded for |
callback |
*
|
rows or null |
- Source:
getlistOfGroupsForUI(callback)
Returns list of groups for admin UI table view
Parameters:
Name |
Type |
Description |
callback |
function
|
rows or null |
- Source:
updateGroup(gId, groupName, oId, callback)
Parameters:
Name |
Type |
Description |
gId |
integer
|
Group-ID |
groupName |
string
|
New group name |
oId |
integer
|
organization ID |
callback |
function
|
success, false or true |
- Source: