Annotation Interface EntityAttributePolicy


Defines entity attribute resource policy in annotated resource role (see ResourceRole). Multiple EntityAttributePolicyContainer annotations may be placed on a single method. EntityAttributePolicyContainer annotation may present on multiple methods of the same class. Annotated method may have any name and return type.

Example:

 @ResourceRole(name = "My Role", code = "myRole")
 public interface MyRole {

     @EntityAttributePolicy(entityClass = Order.class,
         attributes = {"number", "date"},
         actions = {EntityAttributePolicyAction.UPDATE})
     @EntityAttributePolicy(entityClass = Customer.class,
         attributes = "*",
         actions = {EntityAttributePolicyAction.READ})
     void entityAttributes();
 }
 
See Also:
  • Element Details

    • entityClass

      Class<?> entityClass
      Default:
      io.jmix.security.role.annotation.NullEntity.class
    • entityName

      String entityName
      Default:
      ""