EssGetApplicationAccess() gets a list of user application access structures, which contain information about user access to applications.
ESS_FUNC_M EssGetApplicationAccess (hCtx, UserName, AppName, pCount, ppUserApp);
| ESS_HCTX_T | hCtx |
| ESS_STR_T | UserName |
| ESS_STR_T | AppName |
| ESS_PUSHORT_T | pCount |
| ESS_PPUSERAPP_T | ppUserApp |
| hCtx | Essbase API context handle. |
| UserName | User name. If NULL, lists all users for the specified application. |
| AppName | Application name. If NULL, lists all applications for the specified user. |
| pCount | Address of variable to receive count of user application structures. |
| ppUserApp | Address of pointer to receive an allocated array of user application structures. |
If successful, returns a count of users/applications in pCount, and a list of user application structures in ppUserApp.
This function requires the caller to have Application Design privilege (ESS_PRIV_APPDESIGN) for the specified application, unless they are getting their own application access information.
ESS_FUNC_M
ESS_GetApplicationAccess (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_STR_T UserName;
ESS_STR_T AppName;
ESS_USHORT_T Count = 0;
ESS_USHORT_T ind;
ESS_PUSERAPP_T UserApp = NULL;
UserName = "Admin";
AppName = "";
sts = EssGetApplicationAccess(hCtx, UserName,
AppName, &Count, &UserApp);
if(!sts)
{
if(Count && UserApp)
{
printf ("\n------Application Access List----\n\n");
for (ind = 0; ind < Count; ind++)
{
printf ("User->%s Application->%-10s
Access->%-4d MaxAccess->%-6d\r\n",
UserApp[ind].UserName,
UserApp[ind].AppName,
UserApp[ind].Access,
UserApp[ind].MaxAccess);
}
EssFree (hInst, UserApp);
}
else
printf ("\rUser Application list is empty\n\n");
}
return (sts);
}
EssGetDatabaseAccess()
EssListUsers()
EssSetApplicationAccess()
EssSetUser()