Issue

It is possible that, when connected as a user with low privileges (for instance, access to a single table of the model), you might not be able to see multi-entities displays and associated objects (such as forms and other UI components).


Cause

For instance, if a user cannot access forms or other components whereas they should be able to (since they have access to the targeted entity), it may come from the fact that the display is multi-entities.

This article will help you troubleshoot that kind of issues.


Solution

A quick way to troubleshoot this behavior and to validate that it is indeed the root cause, is to:

  • Give rights on all entities to the users
  • Check if they can now access
  • If so, remove some entities until the users can no longer access the form, to identify which entity privileges were missing

Because, when implementing multi-entities displays, you need to make sure that the different roles have all the required privileges for each entity involved in those multi-entities displays. Which includes references materialized as foreign keys directly, but also attributes from other entities (for example in a use case of search form).


Example

Let's take the example of a search form for an entity 'Person', that includes search on foreign keys 'PersonProduct' and 'Product'.

The need here is to find customers based on their characteristics or what they purchased.

If we only grant privileges to the 'Person' table in the role's privileges, then users with 'BusinessUser' roles won't be able to see said search form:



But if we add 'PersonProduct' and 'Product' entities in the role's privileges, then users with 'BusinessUser' roles can see and use said search form: