59.17 CURRENT_USER_IN_GROUP Function
This function returns a Boolean result based on whether the current user is a member of the specified workspace group. You can use the group name or group ID to identify the group.
Note:
This function operates on the native Oracle APEX user accounts repository and is only applicable to applications configured with Oracle APEX Accounts authentication.
Syntax
APEX_UTIL.CURRENT_USER_IN_GROUP (
p_group_name IN VARCHAR2 )
RETURN BOOLEAN;
APEX_UTIL.CURRENT_USER_IN_GROUP (
p_group_id IN NUMBER )
RETURN BOOLEAN;
Parameters
Parameter | Description |
---|---|
p_group_name |
Identifies the name of an existing group in the workspace. |
p_group_id |
Identifies the numeric ID of an existing group in the workspace. |
Example
The following example demonstrates how to use the CURRENT_USER_IN_GROUP
function to check if the user currently authenticated belongs to the group Managers
.
DECLARE
VAL BOOLEAN;
BEGIN
VAL := APEX_UTIL.CURRENT_USER_IN_GROUP(p_group_name=>'Managers');
END;
Parent topic: APEX_UTIL