The Retrieve Object Authority 2 command retrieves the object
authorities for a user of an object. Only the specific authorities
for the user as seen on the DSPOBJAUT display are returned. Group
authorities, Authorization List authorities, Program adopt, and
*PUBLIC authorities are not considered.
You must have *ALLOBJ authority to use RTVOBJAUT2.
A typical series of commands would be:
DCL &OBJAUT *CHAR LEN(10)
.
RTVOBJAUT OBJ(xxx) OBJTYPE(*yyy) USER(zzz) OBJAUT(&OBJAUT)
IF (&OBJAUT *EQ '*CHANGE') DO
The 'Object Authority' for the user would be retrieved and the
program would perform some processing if the user had *CHANGE
authority.
Contrast with RTVOBJAUT command
-------------------------------
RTVOBJAUT2 accesses only the information seen on the DSPOBJAUT
display for a specific user.
The RTVOBJAUT command uses the system API to check authority.
Consequently, Group Authorities, Authorization List authorities, and
Program adopt are considered. The command may be run by any user to
retrieve the authorities of the current user. A different user may
be named if sufficient authorization exists. See the discussion with
the tool documentation.
RTVOBJAUT2 escape messages you can monitor for
----------------------------------------------
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
OBJ The qualified object name. The library value
defaults to *LIBL. *CURLIB may also be specified.
OBJTYPE The object type. Any valid type may be entered
including *AUTL types.
USER The user profile to be checked. A specific user or
*PUBLIC may be specified.
USEAUT Does the user have at least *USE authority. This is
a simple Y/N field which has a Y if the user has at
least OBJOPR and READ rights. The user may have
other rights and the CHGAUT variable may also be a
Y. The optional return variable must be specified
as *CHAR LEN(1).
CHGAUT Does the user have at least *CHANGE authority. This
is a simple Y/N field which has a Y if the user has
at least OBJOPR, READ, ADD, UPD, and DLT. The user
may have other rights. The optional return variable
must be specified as *CHAR LEN(1).
OBJAUT The description of the users object authority. The
values returned will be *USE, *CHANGE, *ALL,
*EXCLUDE, or 'USER DEF'. The optional return
variable must be specified as *CHAR LEN(10).
OBJOPR A simple X/b return value for whether the user has
object authority. The optional return variable must
be specified as *CHAR LEN(1).
OBJMGT A simple X/b return value for whether the user has
object management authority. The optional return
variable must be specified as *CHAR LEN(1).
OBJEXIST A simple X/b return value for whether the user has
object existence authority. The optional return
variable must be specified as *CHAR LEN(1).
OBJALTER A simple X/b return value for whether the user has
object alter authority. The optional return
variable must be specified as *CHAR LEN(1).
OBJREF A simple X/b return value for whether the user has
object reference authority. The optional return
variable must be specified as *CHAR LEN(1).
DATARD A simple X/b return value for whether the user has
data read authority. The optional return variable
must be specified as *CHAR LEN(1).
DATAADD A simple X/b return value for whether the user has
data add authority. The optional return variable
must be specified as *CHAR LEN(1).
DATAUPD A simple X/b return value for whether the user has
data update authority. The optional return variable
must be specified as *CHAR LEN(1).
DATADLT A simple X/b return value for whether the user has
data delete authority. The optional return variable
must be specified as *CHAR LEN(1).
EXECUTE A simple X/b return value for whether the user has
execute authority. The optional return variable
must be specified as *CHAR LEN(1).
AUTL The name of the authorization list assigned to the
object. *NONE will be returned if no authorization
list is assigned. The optional return variable must
be specified as *CHAR LEN(10).
AUTHLSTMGT A simple X/b return value for whether the user has
authorization list management authority. If other
than an *AUTL object is specified, a blank will be
returned. The optional return variable must be
specified as *CHAR LEN(1).
Restrictions
------------
You must have *ALLOBJ special authority to use RTVOBJAUT2.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKALLOBJ Check *ALLOBJ special authority
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVOBJAUT2 *CMD TAASEGK QATTCMD
TAASEGKC *PGM CLP TAASEGKC QATTCL
|