Function ''HasUserAuthority()''

Top  Previous  Next

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

Syntax:

HasUserAuthority(usernamecheckpointtarget-symbol)

 

Parameters:

username

The name of the user

checkpoint

The checkpoint name to check

target-symbol

The target symbol 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', v: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()