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.
Asked
Active
Viewed 1,482 times
1

Markus Appel
- 3,138
- 1
- 17
- 46
2 Answers
2
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.

Tony Andrews
- 129,880
- 21
- 220
- 259
-
That's even better than my solution! Thank you. – Markus Appel Sep 01 '17 at 14:13
0
I found the solution myself:
SELECT group_name
FROM wwv_flow_group_users
WHERE user_id = (SELECT user_id
FROM wwv_flow_users
WHERE user_name ='MRITTMAN')
This lists all group names the user "MRITTMAN" is assigned to.

Markus Appel
- 3,138
- 1
- 17
- 46