Check User Special Authorities (QSYCUSRS) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The Check User Special Authorities (QSYCUSRS) API provides an indication of whether the user has the specified special authorities.


Authorities and Locks

User Profile Authority
*READ

When the API checks for special authorities and the user profile name parameter is *CURRENT or the user who is currently running, the special authorities available to the user include any special authorities the user or the group has, and any program adopted special authorities. If the user profile specified is not the user currently running, then the special authorities available to the user are only the special authorities the user and his group have.

If previous programs in the program stack adopt their owner's authority, the adopted authority for the current program is the accumulated adopted authority from all other programs in the program stack that adopt authority.


Required Parameter Group

Authority indicator
OUTPUT; CHAR(1)

Whether the user has the specified special authorities.

This parameter contains one of the following:


User profile name
INPUT; CHAR(10)

The name of the user whose special authorities are checked.

You can specify the following special value:


Special authority
INPUT; CHAR(*)

The special authorities checked for the user. This parameter can contain up to eight 10-character fields.
Each of the 10-character fields can contain one of the following special values.


Number of authorities
INPUT; BINARY(4)

The number of special authorities specified in the special authority parameter. You can specify 1 through 8.

Call level
INPUT; BINARY(4)

The number of call levels to back up in the program stack to do the authority check. For example, if the program that calls this API adopts authority, you would probably not want the authority check to use the adopted authority. Therefore, the authority check should be done at the call level previous to the current level. This parameter should then contain a 1. You can check the authority at the various call levels by signifying a numeric equivalent to the call level. For example, to check the authority at the current call level, specify a 0; to check the authority at the previous call level, specify a 1.

This parameter is only used if the user profile name parameter is *CURRENT, or the current user name for the job.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Error Messages



API introduced: V2R2

[ Back to top | Security APIs | APIs by category ]