Creating permissions in AOT (Become an expert)

In this section, we will take a look at how to create permissions that can be assigned to specific security roles using the AOT form.

Getting ready

We will learn how to create permissions for a new form and configure the necessary setup needed to finish this task in a simple way.

You first have to know the hierarchy of the permissions; each permission includes the following:

  • Read
  • Update
  • Create
  • Correct
  • Delete

Read permission is the weakest permission and Delete is the strongest one, and Create permission includes Update and Read permissions.

Note that the descriptions of the permissions are initial descriptions, which are inferred by the system, so you can change and edit the initial values if necessary.

How to do it...

We are going to look at how we can create permissions for a new form and link it to the menu by performing the following steps:

  1. The following screenshot shows the AOT form. Expand the forms node and create a new form. It also shows the set of permissions assigned to this form:
    How to do it...
  2. Open the AOT window by pressing Ctrl + D.
  3. Expand the application object tree.
  4. Right-click on the Forms node and create a new form.
  5. Enter the name of the form as Form1.
  6. Expand the new form.
  7. Right-click on Data Sources and create a new data source.
  8. From the right-hand side of the window, select a table to be the data source, namely CustTable.
  9. Expand the Permission node.
  10. The following screenshot shows the permission sets that are already generated by the system; you can also adjust the properties for every permission from the right-hand side of the form.
    How to do it...
  11. From the right-hand side of the window, make sure that the CreatePermissions, UpdatePermissions, ReadPermissions, and DeletePermissions property fields are set to the default value of Yes.
  12. Only the CorrectPermissions property field is set to the default value of No.
  13. Go to the Menu Item node.

The following screenshot and steps illustrate how to block permission sets from the form that was created, so the permission set will not be available to the selected users as a privilege on the menu item privilege node.

How to do it...
  1. Right-click on Display and select New to create a new display menu item.
  2. Enter a name for the new permission in the Properties tab, at the right-hand side of the window.
  3. From the right-hand side of the window, make sure that the access-level properties are set to Auto.
  4. Go to the UpdatePermissions property field, and change the value from Auto to No.
  5. Click on Save to save your work.
  6. Click on Close to close the AOT window.

How it works...

We defined the permissions, assigned to the new form created, that are required to access the menu item, and we changed the permissions to allow Read and Update access on the form, and also read-only access when a user wants to access the form from the menu item.

There's more...

  • Auto: It means that the set of permissions will be available for the users to select the privileges on the menu item. For example, if the UpdatePermissions property is set to Auto, the permission set under Form | Permissions | Update will be available to select users for privileges under AOT | Security.
  • Access level: It identifies a permission set under AOT | Forms | Form1 | Permissions, or under similar nodes on other AOT elements.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.44.182