Home » Developer & Programmer » Forms » Enable/disable submenus per user
Enable/disable submenus per user [message #80436] Fri, 20 September 2002 11:24 Go to next message
Alekos
Messages: 4
Registered: December 2001
Junior Member
Hi there!

My application is developed in Forms Developer 6 on
Oracle 8.1.7.
I would like to grant access to different parts of
my application menu to different users.
I tried to implement the solution with database roles
but, as soon as I turn the main menu property
Use Security to yes, I cannot access the menu at all,
even if I have granted my user the necessary roles to
access the submenu's.
Could anyone help me out on this...?

Thanxx in advance!
Re: Enable/disable submenus per user [message #80439 is a reply to message #80436] Fri, 20 September 2002 16:15 Go to previous message
Susane
Messages: 27
Registered: September 2002
Junior Member
hi,

If you want to grant users/ roles in a particular menu. In property pallet of menu in start up code used this code as your guide. In my application menu i used to grant the authority per role but if you wish to grant the authority of your menu per user_name

use the GET_APPLICATION_PROPERTY(USER_NAME) = 'name of user'

for use DBMS_SESSION.IS_ROLE_ENABLED('role')

I hope i can help you on this information.

sample coding below:
IF NOT (DBMS_SESSION.IS_ROLE_ENABLED('MPC_MRS')) THEN
Set_Menu_Item_Property('REQUIREMENT.MC_PRODUCTS_BREAKDOWN',ENABLED,PROPERTY_FALSE);
Set_Menu_Item_Property('REQUIREMENT.MC_PRODUCTS_INQUIRY',ENABLED,PROPERTY_FALSE);
Set_Menu_Item_Property('REQUIREMENT.MONTHLY_REQMT_COMPUTATION',ENABLED,PROPERTY_FALSE);
Set_Menu_Item_Property('REQUIREMENT.PCS_PRODUCTS_BREAKDOWN',ENABLED,PROPERTY_FALSE);
Set_Menu_Item_Property('REQUIREMENT.PCS_PRODUCTS_INQUIRY',ENABLED,PROPERTY_FALSE);
Set_Menu_Item_Property('REQUIREMENT.DAILY_REQMT_COMPUTATION',ENABLED,PROPERTY_FALSE);
Set_Menu_Item_Property('ORDER.ORDER_TRANSMISSION',ENABLED,PROPERTY_FALSE);
END IF;
Previous Topic: converting varchar to time
Next Topic: How to cretae a view with parameter?
Goto Forum:
  


Current Time: Sat Mar 02 11:33:14 CST 2024