List Users Authorized to Object (QSYLUSRA) API


  Required Parameter Group:


  Optional Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The List Users Authorized to Object (QSYLUSRA) API puts a list of users privately authorized to an object, including an authorization list, into a user space. The information returned is the authority as it exists for the object. Any authority the process has to the object through its group or adopted authority is not included. *PUBLIC authority to the object is also returned in the first list entry of the user space.

If the object is a database file, an indication of whether the file has field authorities is returned.

This API provides information similar to that provided by the Display Authorization List (DSPAUTL) command or the Display Object Authority (DSPOBJAUT) command.


Authorities and Locks

User Space Authority
*CHANGE
Authority to Library Containing User Space
*EXECUTE
Specified Object or Authorization List Authority
*OBJMGT or be authorized to the Database Security Administrator function of the IBM i through System i™ Navigator's Application Administration support. The Change Function Usage (CHGFCNUSG) command, with a function ID of QIBM_DB_SECADM, can also be used to change the list of users allowed to use the function.
Auxiliary Storage Pool Device Authority
*USE or be authorized to the Database Administrator function of the IBM i through System i™ Navigator's Application Administration support. The Change Function Usage (CHGFCNUSG) command, with a function ID of QIBM_DB_SECADM, can also be used to change the list of users allowed to use the function.

Required Parameter Group

Qualified user space name
INPUT; CHAR(20)

The name of the existing user space used to return the list of authorized users to the object. The first 10 characters specify the user space name, and the second 10 characters specify the library.

You can use these special values for the library name:


Format name
INPUT; CHAR(8)

The name of the format used to list authorized users.

You can specify this format:


Qualified object name
INPUT; CHAR(20)

The name of the object for which the list of authorized users is returned. The first 10 characters specify the object name, and the second 10 characters specify the library.

You can use these special values for the library name:


Object type
INPUT; CHAR(10)

The type of object for which the list of authorized users is returned.

Error code
I/O; CHAR(*)

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


Optional Parameter Group

ASP device
INPUT; CHAR(10)

The name of the auxiliary storage pool (ASP) device in which to search for the library that contains the object.

The valid values are:

If *CURLIB or *LIBL is specified for the library then the ASP device parameter must be specified as *.



User Space Variables

The following tables describe the order and format of the data returned in the user space. For detailed descriptions of the fields in the tables, see Field Descriptions.


Input Parameter Section



Header Section



USRA0100 Format



Field Descriptions

ASP device name of library. The auxiliary storage pool (ASP) device name where the object's library is stored. If the object's library is in the system ASP or one of the basic user ASPs, this field contains *SYSBAS.

ASP device name of object. The auxiliary storage pool (ASP) device name where the object is stored. If the object is in the system ASP or one of the basic user ASPs, this field contains *SYSBAS.

Authority value. The user's authority to the object.

This field contains one of the following values:

Authorization list. The name of the authorization list securing the object. If there is no authorization list securing the object, this field is *NONE.

Authorization list management. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N. This field is only valid if the object type is *AUTL.

Data add. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Data delete. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Data execute. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Data read. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Data update. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Field authorities. Whether the object has field authorities. If the object is a database file and it has field authorities, this field is Y. If not, this field is N. This field is only valid if the object type is *FILE. To see the field authorities for a database file, do DSPOBJAUT OBJ(your_lib/your_dbfile) OBJTYPE(*FILE) AUTTYPE(*FIELD).

Format name. The name of the format used to list users authorized to the object.

Library name specified. The name of the library the object containing the authorization list is in.

Primary group. The name of the user that is the primary group for the object. If there is not a primary group for the object, the field will contain *NONE.

Object alter. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Object existence. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Object management. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Object name. The name of the object for which the list of authorized users is returned.

Object operational. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Object reference. Whether the user has this authority to the object. If the user has the authority, this field is Y. If not, this field is N.

Object type. The type of object for which the list of authorized users is returned.

Owner. The name of the owner of the object. If all authority for the owner is removed, no list entry is returned for the owner.

Reserved. An ignored field set to hexadecimal zeros.

Row or column access control. Whether row or column access control is active on the object. If row or column access control is active on the object this field is Y. If not, this field is blank.

User profile name. The name of the user authorized to the object.

This field can contain the following special value:

User space name specified. The name of the user space used to return the list of users authorized to the object.


Error Messages



API introduced: V4R2

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