Search code examples
oracle-apexbind-variables

Oracle APEX: Built-in User Group Variable


I was wondering if there is a variable like :APP_USER, but instead of the username it should return the user group, so I can check if the current user is administrator.


Solution

  • The APEX_UTIL package contains some functions that can be useful for this too:

    CURRENT_USER_IN_GROUP This function returns a Boolean result based on whether the current user is a member of the specified group. You can use the group name or group ID to identify the group.

    GET_GROUPS_USER_BELONGS_TO This function returns a comma then a space separated list of group names to which the named user is a member.