Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » How get Current user group information (apex 3.2.1 )
How get Current user group information [message #461627] Sun, 20 June 2010 01:39 Go to next message
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

Re: How get Current user group information [message #461695 is a reply to message #461627] Mon, 21 June 2010 01:23 Go to previous message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Which type of report have you created to see user group info?

regards,
Delna

[Updated on: Mon, 21 June 2010 01:24]

Report message to a moderator

Previous Topic: How to compute "a * b = c"?
Next Topic: How to send an error? (HTTP 400)
Goto Forum:
  


Current Time: Thu Mar 28 15:08:38 CDT 2024