How to give read-only access to certain attributes when defining role at design time?

How do I give read-only access to certain entity attributes when designing the role at design time?

@EntityAttributeAccess

This annotation only lets you define attributes to modify. I have looked through the documentation but can’t find it.

Hi @bartekspitza,
EntityAttributeAccess annotation allows you define both read (aka view) and modify access. Take a look at the example below:

@EntityAttributeAccess(entityClass = Entity.class, view = "*", modify = {"attr1", "attr2"})

Regards,
Peterson.

Ooh I see, I thought “view” defined which entity views are allowed, maybe “readOnly” would be more intuitive :smiley:

1 Like