Home » Developer & Programmer » Forms » User Priviledges from Developer form 6i
User Priviledges from Developer form 6i [message #311202] Thu, 03 April 2008 12:41 Go to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

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 Go to previous messageGo to next message
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 #311211 is a reply to message #311205] Thu, 03 April 2008 13:13 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Hello,
Thank you very much. I have solved my problem. Now will you please tell me how to show the message to that user (That is he is not allowed to insert any data).

Thanks
Mahatab
Re: User Priviledges from Developer form 6i [message #311215 is a reply to message #311211] Thu, 03 April 2008 13:25 Go to previous messageGo to next message
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!
Re: User Priviledges from Developer form 6i [message #311216 is a reply to message #311215] Thu, 03 April 2008 13:34 Go to previous message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

hello,
Thank you very much for your early response. i am really greatful to you.

Best Regards.
Mahatab
Previous Topic: Select query problem in form
Next Topic: how to work with Check-Box
Goto Forum:
  


Current Time: Sat Dec 03 14:26:50 CST 2016

Total time taken to generate the page: 0.14169 seconds