Easiest/most CUBA-ish way to restrict access to certain data, but by associated to entity?

In the documentation, I’m not finding an example that’s proving helpful in figuring this one out.

Our application has a table of patient notes; each note refers to a note type (standard lookup many-to-one association) - some of these note types are “clinical” and only certain users are allowed to see or access them in any way.

I’m not seeing an example of blocking access to an entity class based on attributes of another entity (in this case, the note’s note type would determine this).

Any pointers? :smile:

1 Like

Hi!

It looks like you can use access groups for this
https://doc.cuba-platform.com/manual-7.1/constraints.html

I assumed that would be the way but I’m not able to work out how to block access to a type of entity, based on attributes of a pointed-to entity. Is there an example of that use case somewhere?

1 Like

Have you watched this tutorial video?

That example performs filtering based on attributes of associated entity.

No - I hadn’t seen that one. Thanks @AlexBudarov - a good clear example.