There's more...

In some cases, we need a field to be available or unavailable, depending on particular conditions, such as the values in a field, for example, stage_id or state. This is usually handled at the view level using attributes such as states or attrs to dynamically display or hide the field according to certain conditions. Refer to Chapter 10, Backend Views, for a detailed description.

Note that these techniques work at the user-interface level only and don't provide actual access security. To do this, you should add checks in the business logic layer. Either add model methods decorated with @constrains, implementing the specific validations intended, or extend the create, write, or unlink methods to add validation logic. You can get further insights on how to do this in Chapter 6, Basic Server-Side Business Logic.

..................Content has been hidden....................

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