SET-SAFE-USER( ) method

This method only applies to a Progress Application Server (PAS) for OpenEdge application server.

Sets a multi-tenant database connection's current user identity to the stored safe user identity for the database. If the Safe User ID feature is not enabled, the method returns the Unknown (?) value and the identity of the connected session remains unchanged. If the Safe User ID feature is enabled and the method succeeds in setting the database connection's current user identity to the safe user identity, the method returns TRUE; otherwise it returns FALSE.

Return-type: LOGICAL

Applies to: SECURITY-POLICY system handle

Syntax

SET-SAFE-USER ( logical-db-name ) 
logical-db-name

The logical name of the database for which you want to set the safe user identity. The logical database name must be a character string enclosed in quotes, or a character expression.

The following example code shows how to call the SET-SAFE-USER() method.

DEFINE VARIABLE safeUserSet as LOGICAL NO-UNDO.

safeUserSet = SECURITY-POLICY:SET-SAFE-USER(LDBNAME(1)).
IF safeUserSet
THEN 
  MESSAGE "Safe user has been set".
ELSE
  MESSAGE "Safe user was not set".

See also

GET-SAFE-USER( ) method

Overview of Safe User ID in Learn about Identity Management