ADD_USER_ROLE Procedure Signature 2

This procedure assigns a role to a user.

Syntax

APEX_ACL.ADD_USER_ROLE (
    p_application_id in number   default wwv_flow_security.g_flow_id,
    p_user_name      in varchar2,
    p_role_static_id in varchar2 );

Parameters

Table 2-2 ADD_USER_ROLE Procedure Signature 2 Parameters

Parameter Description

p_application_id

The application ID for which you want to assign role to a user. Defaults to the current application.

p_user_name

The case insensitive name of the application user to assign the role to.

p_role_static_id

The case insensitive name of the role static ID.

Example

The following example shows how to use ADD_USER_ROLE procedure to assign role static ID 'ADMINISTRATOR' to the user name called 'SCOTT' in application 255.

begin
    APEX_ACL.ADD_USER_ROLE (
        p_application_id => 255,
        p_user_name      => 'SCOTT',
        p_role_static_id => 'ADMINISTRATOR' );
end;