cwbUN_GetAdminValue

Purpose

This API returns an indication of whether the current iSeries™ Navigator user on the specified iSeries server is allowed or denied use of a specific administrable function. An Administrable function is any function whose use can be controlled through the Application Administration subcomponent of iSeries Navigator.

For example, the Application Administration subcomponent allows an administrator to control whether a user can access several functions in iSeries Navigator. One of these functions is Job Management. The cwbUN_GetAdminValue API can be used to programmatically determine if the current iSeries Navigator user can use the Job Management function by specifying the name of the Administrable function that corresponds to Job Management. See the cwbunpla.h header file for a list of Administrable function names that are supported in iSeries Navigator.

Syntax

CWBAPI unsigned int WINAPI cwbUN_GetAdminValue(
    const char * szSystemName,
    char*   adminFunction,
    cwbUN_Usage& usageValue);

Parameters

const char * szSystemName
The name of the iSeries system on which to perform the check.
char* adminFunction
A pointer to an ASCII string that contains the name of the Administrable function. The string must be null terminated and has a maximum length of 30 bytes + 1 byte for the NULL terminator. See cwbunpla.h for a list of supported input values.
cwbUN_Usage & usageValue
This value is only valid if the return code of CWB_OK is returned. One of two values will be returned:
  • cwbUN_granted -- User is allowed use of the function.
  • cwbUN_denied -- user is denied use of the function.

Return Codes

The following list shows common return values:

CWB_OK
The API was successful.
CWBSY_USER_CANCELLED
The user cancelled the user ID and password prompt presented by the API.

Usage

This API determines if the current iSeries Navigator user for the specified iSeries server is allowed to use the specified function. If no user is currently signed on to the specified iSeries server, the API will sign the user on, possibly displaying a user ID and password prompt.

This API can only be used to check Administrable functions that are in the iSeries Navigator or the Client Applications function category.