This function returns
TRUE if, the user is assigned to any application role. This function can be used to check if a user is allowed to access an application.
APEX_ACL.HAS_USER_ANY_ROLES ( p_application_id in number default wwv_flow_security.g_flow_id, p_user_name in varchar2 default wwv_flow.g_user ) return boolean;
Table 2-3 HAS_USER_ANY_ROLES Function Parameters
The application ID for which you want to check if a user is assigned to any application role. It defaults to the current application.
The case insensitive name of the application user to check. Defaults to the current logged in user.
The following example shows how to use
HAS_USER_ANY_ROLES function to check if the user name called
'SCOTT' is assigned to any application role in application
begin return APEX_ACL.HAS_USER_ANY_ROLES ( p_application_id => 255, p_user_name => 'SCOTT' ); end;