Lists all groups who have access to a particular Essbase Server, application or database.
Syntax
ESS_FUNC_M EssListGroups (hCtx, AppName, DbName, pCount, ppGroupList);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
AppName | ESS_STR_T | Application name. If NULL, lists all groups. |
DbName | ESS_STR_T | databasename. If NULL, lists groups for all databases within application. |
pCount | ESS_PUSHORT_T | Address of variable to receive count of groups. |
ppGroupList | ESS_USERINFO_T, ESS_GROUPINFO_T | Address of pointer to receive an allocated array of group info structures. |
Notes
If both AppName and DbName are not NULL, only groups with access to the specified application and database will be listed. If DbName is NULL, only groups with access to the specified application will be listed. If AppName is NULL, all groups on the logged in server will be listed.
The memory allocated for ppGroupList should be freed using EssFree().
Return Value
If successful, returns a count of the number of groups in pCount, and list of groups with access to the specified application and database in ppGroupList.
Access
This function requires no special privileges.
Example
ESS_FUNC_M ESS_ListGroups (ESS_HCTX_T hCtx, ESS_HINST_T hInst ) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_USHORT_T Count; ESS_PGROUPINFO_T Groups = NULL; ESS_USHORT_T ind; sts = EssListGroups (hCtx, NULL, NULL, &Count, &Groups); if (!sts) { if (Count && Groups) { printf ("\r\n-----Group List-----\r\n\r\n"); for (ind = 0; ind < Count; ind++) printf ("Name->%s\r\n", Groups [ind].Name); EssFree (hInst, Groups); } else printf ("\r\nGroup List is Empty\r\n\r\n"); } return (sts); }
See Also