Granting Privaleges Help [message #212675] |
Sun, 07 January 2007 10:57 |
lune
Messages: 27 Registered: August 2006 Location: UAE
|
Junior Member |
|
|
Hi All,
I have diffrent forms and I have users table which has a user_type feild (Administrator,Manager,Employee). I want to assign different privaledges for each of them. I want each user have the privaleges according to his type on the form when he login with his user name and password.
I want to know how to do it?
sql/plus
GRANT INSERT, UPDATE ON TBL_EMP TO ALEX
is that what I have to do or not?
Waiting your help
-----
lune
|
|
|
Re: Granting Privaleges Help [message #212683 is a reply to message #212675] |
Sun, 07 January 2007 12:59 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Create three roles: administrator, manager, employee.
Grant desired privileges on your tables to those roles. For example,
GRANT SELECT ON some_table TO employee;
GRANT SELECT, UPDATE ON some_table TO manager;
GRANT ALL ON some_table TO administrator;
Now, create database users (for example, littlefoot, lune, frank, ...) and grant those roles to newly created users:
GRANT employee TO littlefoot;
GRANT manager TO lune;
GRANT administrator TO lune;
Read more about Administering Users and Security here.
|
|
|
|
|