Home » Developer & Programmer » Forms » Menu Role/Security
Menu Role/Security [message #17892] Thu, 03 February 2005 08:47 Go to next message
Amarsey
Messages: 17
Registered: March 2002
Junior Member
I want to prevent certain users from some menu items within my customized menu. How do i acheive that.
Initially i wrote a program unit attached to the menu module to single out the administrator from the other users but i get some compiling error message
e.g.

select count(*) into x from dba_users
where username='ADMIN';
IF X<0 THEN
MESSAGE('Access Denied See Administrator');
END IF;

I got error message that 'dba_users must be declared'

Pls help
Re: Menu Role/Security [message #17895 is a reply to message #17892] Thu, 03 February 2005 11:19 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
If you're using an Oracle Forms Menu Module (MMB/MMX) you could use the built-in functionality. Create some menu related database roles, assign the roles to users and to the menu items you want in Oracle Forms.

In short:
1. On the database
CREATE ROLE MENU_ADMIN;
CREATE ROLE MENU_OTHERS;

2. On the database
GRANT MENU_ADMIN TO ADMIN
GRANT MENU_OTHERS TO ...

3. In Forms: Enable the role/menu security.

DBA_USERS is indeed not visible to just every user.

You could also check for USER. If USER = 'ADMIN', but that's not good practice, since you're hardcoding string literals. What will you do if there's an ADMIN2 or an ADMIN_BACKUP user?

MHE
Re: Menu Role/Security [message #17915 is a reply to message #17895] Fri, 04 February 2005 01:53 Go to previous messageGo to next message
Amarsey
Messages: 17
Registered: March 2002
Junior Member
hi,
I have done that but i got this error message when i run the form as a result it does not bring out the menu:
FRM-10247: No active items in root menu of application.
Re: Menu Role/Security [message #17977 is a reply to message #17915] Mon, 07 February 2005 03:16 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Well, you need to have some active items left in your menu that are accessible to your users (Like the EXIT option):

----------------------------------------------------------------------
FRM-10247: No active items in root menu of application.

Cause: You tried to open an application but its root menu has no items that you can access. The root menu is either the application's main menu or another menu specified when Form Builder called Forms Designer.

Action: Notify your DBA.

----------------------------------------------------------------------
MHE
Re: Menu Role/Security [message #113572 is a reply to message #17977] Mon, 04 April 2005 12:23 Go to previous message
Matloob
Messages: 39
Registered: December 2004
Member

hi
i have applied the way u have specified
and i have some active items in my main menue root but the problem i m faising that when i run that form it gave me error that curnt user does not have privalages to run the form builder menu
and it does not shown any menue item event the active item to plz do provide me the sameple menue file thanks
Previous Topic: Positioning on an important tree structure in web mode
Next Topic: how'll we get the correct format of text in the report which is enterd into db through frm editor
Goto Forum:
  


Current Time: Fri Nov 08 05:01:07 CST 2024