[Dev] Lock part of object based on its state and user permission


I can’t find a way to properly lock some fields of an object based on its properties and user rights.
Use case would be an object with, say, states A B C, and fields E F G
E can be modified if object in state A, F if in B, etc.
xxxManager can modify some of the fields no matter its permissions.
So far :

  • all readonlyIf/hideIf are JavaScript only, so I can’t get user permissions (and have no server site validation so only partial) ;
  • canRead/canEdit are JavaScript too ;
  • permissions only have entity granularity ;
  • meta_permissions only have the ability to handle per-user canRead/canEdit (see first point) ;
  • binding an action-valid on each onChange would be very boring (plus it’s also client only check).

Of course, I could intercept save action (somehow) and make a diff on the object but this would be very boring… Did I miss something?


it is old but have you gone through this