Application role
copy linkTranscription

The use of a web application and its access to information could be free, (so it would be enough to be aware of the publication url to access it), or it could be limited both in access via credentials and in the filtered display of information depending on of the user's qualification: I said qualification I could very well speak of Role.
What you will see in this tutorial is how Foundation addresses the problem and what mechanisms it offers; it is always possible to implement its own different mechanism for the protection of information.
The logic passes from what is called Operational Role: to access the application it is necessary, in the first initial stages, to assign the application a numerical value identifying a Role among those listed in the project, or rather in the application, without the setting a Role the application will not be built; in fact, if we analyze the application project tree we find a folder called Roles with a level hierarchy inside.
In all projects, by default, the roles Administrator - Super User - Normal User - Anonymous are present: each role is also associated with a numerical value that we can find in the Role Values ??List.
The hierarchy is completely modifiable, both in the identifiers and in the structure itself: for example we may want, for the YouBb application, a first level as Administrator, a second Operator level, and finally a third level divided into Registered Customer and Property Owner. br>
Let's start by making the changes to the Roles: double click on the Super User role and call it Operator, then delete the Anonymous Role, rename the Normal User to Registered Customer and right-click Add Role the Structure Owner role.
We also check the Values ??list, as you can see by changing the Roles you also change the value list: the numerical value assigned is completely customizable: we could assign the value 10 to the Administrator, the operator 20, and the other two on the same level 30 and 31 .
Knowing this mechanism, in the Users table a proper Role field has been foreseen combined with the Roles value list, assuming an access dynamic of this type:
This mechanism is what we set up in the next tutorial.
What you will see in this tutorial is how Foundation addresses the problem and what mechanisms it offers; it is always possible to implement its own different mechanism for the protection of information.
The logic passes from what is called Operational Role: to access the application it is necessary, in the first initial stages, to assign the application a numerical value identifying a Role among those listed in the project, or rather in the application, without the setting a Role the application will not be built; in fact, if we analyze the application project tree we find a folder called Roles with a level hierarchy inside.
In all projects, by default, the roles Administrator - Super User - Normal User - Anonymous are present: each role is also associated with a numerical value that we can find in the Role Values ??List.
The hierarchy is completely modifiable, both in the identifiers and in the structure itself: for example we may want, for the YouBb application, a first level as Administrator, a second Operator level, and finally a third level divided into Registered Customer and Property Owner. br>
Let's start by making the changes to the Roles: double click on the Super User role and call it Operator, then delete the Anonymous Role, rename the Normal User to Registered Customer and right-click Add Role the Structure Owner role.
We also check the Values ??list, as you can see by changing the Roles you also change the value list: the numerical value assigned is completely customizable: we could assign the value 10 to the Administrator, the operator 20, and the other two on the same level 30 and 31 .
Knowing this mechanism, in the Users table a proper Role field has been foreseen combined with the Roles value list, assuming an access dynamic of this type:
- User enters login credentials.
- The user table is searched for credentials.
- You get your Userid and your role.
- The role is applied to the application.
This mechanism is what we set up in the next tutorial.
Changed on: 17/11/2023 / From version: 20.5.8000