Roles and Entity Attributes: add a "Required" checkbox in addition to Modify, Read-Only, Hide

It would nice to be able to easily configure certain attributes to be Required, but only by users of a particular Role.

Hi,

It seems that it should be a custom permission with name and the corresponding business logic. Take a look at specific permissions Permissions - CUBA Platform. Developer’s Manual

1 Like

Thank you, that could definitely be a way to do it. I was thinking for a more dynamic / change in production type approach could be interesting.

1 Like

It could be implemented, but not sure that it makes sense with only required.

From my experience, required does not solve problems with validation for different users. Validation is somewhat more complex that should be consistent across application and thus cannot be defined as dynamic configuration.

2 Likes

I think it could be an interesting feature. We have tables with many non-mandatory fields, which may become mandatory for some user roles. This depends on the setting that is given to the customer and the individual user. A practical example, I have the non-mandatory price attribute on the product entity, this because I do not need to specify the price to insert a product. For a given customer, the user who places the products, must always specify the price for business rules. A simple mandatory flag within the user role would solve the problem.

1 Like