Topic: How to Use _roles and _user for User Access Restrictions and Permissio

How do I use _roles and _user?

What features do they have? Is it possible to restrict users so they can only access certain pages or forms? For example, can I restrict a user so they can only access a specific form?

Is it also possible to restrict users from deleting or editing records?

I hope you can provide some simple and basic examples. Thank you in advance!

Post's attachments

Attachment icon New folder.zip 381.68 kb, 34 downloads since 2026-10-29 

Re: How to Use _roles and _user for User Access Restrictions and Permissio

Access control


https://myvisualdatabase.com/help_en/Introduction4.html

Re: How to Use _roles and _user for User Access Restrictions and Permissio

Hi,
Users and Roles functionality is very powerful (and sadly, I suspect, one of the least used features of MVD).
No script is needed - just standard configuration options.
Attached is a basic example with 4 users (the passwords are 'admin', 'london', 'berlin' and 'oslo').
The example shows
1.  buttons can be disabled for certain users (for example, only the 'admin' can create or delete records)
2.  buttons can be specific to individual roles (for example, an 'English' button is only available to the 'London_Office').
3.  if certain buttons are restricted by roles, the forms can be made specifically for that role.
4.  elements can be hidden (for example, the combobox on Form1 is only available to the 'Admin'. 
5.  combobox choices can be restricted by role (for example, in Form2, users are restricted to seeing only their own country)
6.  data can be filtered automatically (for example, on Form1, the Berlin_Office' only sees data for Germany etc).
7.  captions can be changed depending on the role (very useful for multi-lingual use).
Just log on using the different users and see how things change.
This is just a small example of the many things you can do but hopefully is enough to start you off.
Derek.

Post's attachments

Attachment icon basic roles example.zip 446.6 kb, 52 downloads since 2026-10-29 

Re: How to Use _roles and _user for User Access Restrictions and Permissio

Thank you Sir, Sparrow & Sir Derek, big_smile