User Priviledges from Developer form 6i [message #311202] |
Thu, 03 April 2008 12:41  |
|
Hello,
I have got a login form, where username and password is needed to access the main entry form. Now based on the user name and password i have to grant priviledges on insert, update and delete option.Can anyone please provide me the code for performing this tas. Any early response will be highly appreciated.
Thnak you.
Mahatab
|
|
|
Re: User Priviledges from Developer form 6i [message #311205 is a reply to message #311202] |
Thu, 03 April 2008 12:54   |
solisdeveloper
Messages: 48 Registered: March 2008 Location: Mexico
|
Member |
|
|
Hi:
You can use the "Set_Block_Property" Built in to modify the properties:
Insert_allowed, Update_allowed, Query_allowed, etc. But to grant privileges...I'm not sure about that!
I would strongly suggest that you create 2 tables, one for your users and another for user's roles.
So when you introduce the user and password you can query and see what role that person may have and acording to that you can decide wich modules to show or hide instead of code-basing it.
Regards!
|
|
|
|
Re: User Priviledges from Developer form 6i [message #311215 is a reply to message #311211] |
Thu, 03 April 2008 13:25   |
solisdeveloper
Messages: 48 Registered: March 2008 Location: Mexico
|
Member |
|
|
Well the easiest way is to use the Message Built-In, for example in the Pre-Insert trigger you check If the user has privileges to insert, and if not, then you can type something like this:
Message ('Sorry but you are not allowed to perform this action, please contact your administrator.');
Or if you want something a little more visual use an Alert
Regards!
|
|
|
|