cwbUN_CheckObjectAuthority

Purpose

Returns an indication of whether the iSeries™ Navigator user has authority to a particular object on the iSeries server.

Syntax

CWBAPI unsigned int WINAPI cwbUN_CheckObjectAuthority(
    const char * szObjectPath,
    const char * szObjectType,
    const char * szAuthorityType,
      const char * szSystemName
    );

Parameters

const char * szObjectPath - input
The iSeries object path for which authority is to be checked.
const char * szObjectType - input
The iSeries object type for the object for which authority is to be checked, for example *DTAQ.
const char * szAuthorityType - input
The iSeries object authority to be checked. Possible values are:

If more than one authority is to be checked, the authorities should be concatenated (for example, *OBJMGT*OBJEXIST). Up to eleven authority types may be specified on a single call. The function will return CWB_OK only if the user has all of the specified authorities to the object.

const char * szSystemName - input
The name of the iSeries system on which to perform the check.

Return Codes

The following list shows common return values:

CWB_OK
The user has the specified authority to the object.
CWBUN_USER_NOT_AUTHORIZED
The user does not have the specified authority.
CWBUN_OBJECT_NOT_FOUND
The specified object could not be checked.
CWBUN_INTERNAL_ERROR
Object authority could not be checked.

Usage

If *EXCLUDE is specified as an authority, no other authority types may be specified. *AUTLMGT is valid only if 'szObjectType' is *AUTL.