How get Current user group information [message #461627] |
Sun, 20 June 2010 01:39  |
BBMamun
Messages: 94 Registered: February 2010 Location: Dhaka, Bangladesh
|
Member |
|
|
Hi I have created a form to create Apex Application User with the following process
-------------------------------------
DECLARE
V_USER_ID NUMBER(20);
V_USER_NAME VARCHAR2(20);
V_USER_GROUP NUMBER(3);
BEGIN
SELECT USER_SEQ.NEXTVAL INTO V_USER_ID
FROM DUAL;
V_USER_NAME := UPPER(:P41_USER_NAME);
V_USER_GROUP := TO_NUMBER(:P41_USER_GROUP);
APEX_UTIL.CREATE_USER(
p_user_id => V_USER_ID,
p_user_name => V_USER_NAME,
p_web_password => 'abcd*1234',
p_group_ids => V_USER_GROUP);
END;
------------------------------------------------
It works fine, and To check whether the user is created I have created a report region with the query
------------------------------------------------
SELECT user_id,user_name FROM wwv_flow_users
------------------------------------------------
It shows the user_id and user_name in the report, but I want to know which group it belongs to, so I modified the code to
SELECT user_id,user_name,APEX_UTIL.GET_GROUPS_USER_BELONGS_TO(user_name) "User Belongs to group"
FROM wwv_flow_users
But the output does not show any group. Now I need to determine which group it belongs to, to enforce access control according to group policy. Waiting for you response.
Regards
Hasan Al Mamun
Programmer
Bangladesh Bank
Bangladesh
[Updated on: Sun, 20 June 2010 01:40] Report message to a moderator
|
|
|
|