Home » Developer & Programmer » Forms » re: Menu Module with user-id
re: Menu Module with user-id [message #85458] Tue, 29 June 2004 03:05 Go to next message
jhsharma
Messages: 58
Registered: June 2004
Member
Hi

I want to make a menu module with Add,Modify, Query Only, ,..... module and the same menu will be availabe to some of the users depending upon the roles.

 

How do i create such users. ?

How do I add above control to my menu module.

 

using oracle 8 with forms 5

regards

 
Re: re: Menu Module with user-id [message #85460 is a reply to message #85458] Tue, 29 June 2004 20:54 Go to previous message
Susane
Messages: 27
Registered: September 2002
Junior Member
Hi!

Try this one to secure the security of user per module. this is for data block security per role.
the second part is security per user name.
Hope this will help you. Im using also oracle 8 forms 4.5.

thanks
sane


-- This is a pattern program used to set the properties of data block
-- Created by Susane M. Cardel 2001.04.06

PROCEDURE mis$data_block_security IS
blk_id BLOCK;
BEGIN
IF NOT (DBMS_SESSION.IS_ROLE_ENABLED('MPC_OFFICE')) THEN
blk_id := Find_block('PARTS');
SET_BLOCK_PROPERTY(blk_id,INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY(blk_id,UPDATE_ALLOWED,PROPERTY_TRUE);
-- SET_BLOCK_PROPERTY(blk_id,DELETE_ALLOWED,PROPERTY_FALSE);
SET_BLOCK_PROPERTY(blk_id,DELETE_ALLOWED,PROPERTY_TRUE);

END IF;
IF NOT (DBMS_SESSION.IS_ROLE_ENABLED('ENGG')) THEN
blk_id := Find_block('PART_SUPPLIERS');
SET_BLOCK_PROPERTY(blk_id,INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY(blk_id,DELETE_ALLOWED,PROPERTY_TRUE);
END IF;

END;

for column security....

-- This is a pattern procedure to check table column security
-- Created By: Susane M. Cardel 04.19.2001

PROCEDURE mis$column_security IS
itm_id Item;
BEGIN
IF NOT (DBMS_SESSION.IS_ROLE_ENABLED('ENGG')) THEN
itm_id := Find_Item('parts.part_no');
Set_Item_Property(itm_id,ENABLED,PROPERTY_FALSE);
Set_Item_Property(itm_id,UPDATEABLE,PROPERTY_FALSE);
itm_id := Find_Item('parts.part_kind_code');
Set_Item_Property(itm_id,ENABLED,PROPERTY_FALSE);
Set_Item_Property(itm_id,UPDATEABLE,PROPERTY_FALSE);
itm_id := Find_Item('parts.part_size_code');
Set_Item_Property(itm_id,ENABLED,PROPERTY_FALSE);
Set_Item_Property(itm_id,UPDATEABLE,PROPERTY_FALSE);
itm_id := Find_Item('parts.color_code');
Set_Item_Property(itm_id,ENABLED,PROPERTY_FALSE);
Set_Item_Property(itm_id,UPDATEABLE,PROPERTY_FALSE);

END IF;
END;

IF GET_APPLICATION_PROPERTY(USERNAME) IN ('REMY','SUSANE', 'MALIN','ORA01','MPC_OPERATOR') THEN

CALL_FORM ('\SQL_SERVER1foracle&vb appproduction supportMPCKSERIES_PCS_HEADER_COMPUTATION',HIDE,DO_REPLACE);

ELSE

MESSAGE('YOU ARE NOT AUTHORIZED TO PROCESS THIS PROGRAM... PLEASE ASK ORA01 / MPC_OPERATOR / REMY / MALIN / SUSANE"s USERNAME....');
END IF;
Previous Topic: ActiveX control for scanner
Next Topic: export
Goto Forum:
  


Current Time: Tue May 07 20:45:09 CDT 2024