Topic: give access for other users in buttons

When I am the administrator I have full access in my software, but when I have other user with no Administrator access they should have limited access such us no allowed press the delete key. How is this possible? I have create the users with the role in the menu bar  Options - Users

Re: give access for other users in buttons

Just Just use the Role Option in the Button's Properties

Post's attachments

Attachment icon image.png 7.02 kb, 105 downloads since 2020-08-26 

brian

3 (edited by v_pozidis 2020-08-26 12:52:36)

Re: give access for other users in buttons

How can i do it by script. I like to have a form to give those permissions. Like to give the administation permisions or some limited permisions for users

4 (edited by brian.zaballa 2020-08-26 14:03:24)

Re: give access for other users in buttons

You mean the Admin User can set the access and not by the developer right?

I think, best way to do is:
- List down and plan thoroughly buttons or modules you want other user to access, then store it in database.
- Do it with script

I made some script, compiled it in version 6.4-beta. I hope it gives you an idea on how to work on your project. Cheers!

Post's attachments

Attachment icon testuseraccess.zip 497.34 kb, 236 downloads since 2020-08-26 

brian

Re: give access for other users in buttons

try it...

if (Application.User.is_admin = true)  then Form1.Button1.Enabled := True else Form1.Button1.Enabled := false;
or
if  (Application.User.Role = 'Your Added Role') then Form1.Button1.Enabled := True else Form1.Button1.Enabled := false;
or
if (Application.User.is_admin = true) or (Application.User.Role = 'Your Added Role') then Form1.Button1.Enabled := True else Form1.Button1.Enabled := false;