Function "HasUserAuthority()"

Top  Previous  Next

Checks whether a user has the given authority (checkpoint). 

Syntax:

HasUserAuthority(usernamecheckpointpool-variable-name)

 

Parameters:

username

The name of the user

checkpoint

The checkpoint name to check

pool-variable-name

The name of the pool variable that will store the function result. It will contain true if the user has the authority, false otherwise.

 

Completion Codes:

0: Normal completion

8: username not found or disabled

12: Syntax error or Security Broker error

 

Example:

  HasUserAuthority('usr1', 'CAN_MANAGE_CUSTOMERLIST', check_result)

  @doif(v:check_result = true)

    @set(v:MESSAGE,'You can manage customer list')

  @doelse()

    @set(v:MESSAGE,'You can not manage customer list')

  @doend()

 

See SML Functions