9.193 SET_AUTHORITY

Note: Built-In Function Rules     Usage Options

Sets the authority of a user to a LANSA object. The caller of this Built-In Function must have management rights (MD) to the LANSA object.

Special Notes: This Built-In Function provides access to very advanced facilities that basically allow RDML functions to construct new RDML applications.

This is a very specialized area that requires very good knowledge of the LANSA product. Use of this Built-In Function in a "commercial" application (e.g. Order Entry) is not normal and should not be attempted

Changes to a user's access rights to LANSA objects may not take effect until the next time the user starts to use LANSA. If the user is currently using LANSA they should exit from LANSA and then re-invoke LANSA to ensure that the changed object access rights take effect.

This condition also applies to the caller of SET_AUTHORITY changing their own authorities to objects.

Changes to authority will have no impact if security checking is disabled for the type of object (process, function, or file). To determine your security settings on IBM i refer to Execution and Security Settings in the Review System Settings facility described in the LANSA for i User Guide. To determine your security settings on Windows, or applications deployed to Linux, refer to the x_defppp.h file that you compiled your processes and forms with. You can find out more about this file in The X_DEFppp.H Definition Header File.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Object name.

1

10

 

 

2

A

Req

Object extension.

1

10

 

 

3

A

Req

Object type.

Valid types are:

AT - Application template*
DF - Field
FD - File
PD - Process
PF - Function
P# - Partition*
SV - System variable
MT - Multilingual variable.

*Do not use with Visual LANSA.

2

2

 

 

4

A

Req

User name.

1

10

 

 

5

A

Req

Access rights

This is a string of 2 character codes representing the different access rights that the user is to have.

The individual access rights are: 

UD - Use Definition
MD - Manage Definition
DD - Existence of Definition
DS - Data - Display
AD - Data - Add
CH - Data - Change
DL - Data - Delete

If the entire string is blank then the user is to have their access rights to the object revoked.

If the string has the special value '*DELETE' then the user's authority is to be deleted, thus causing their rights to revert back to their associated group profile or *PUBLIC.

1

20

 

 

 

Dependencies

Object Type

Object Name

Object Extension

AT

template name

*blank

 

DF

field name

*blank

 

FD

file name

*blank, *LIBL, library name

 

PD

process name

*blank

 

PF

process name

function name

 

P#

partition name

*blank

 

SV

positions 1-10 of system variable name

positions 11-20 of system variable name

 

MT

positions 1-10 of multilingual variable name

positions 11-20 of multilingual variable name

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

OK = The authority of the user to the LANSA object has been set.
ER = Error occurred in setting the authority of the user to the object.

2

2