Disabling the Edit button might not be enough, because of those little “pencil” buttons on each field (similar to the old “Inline Edit” buttons).
Disabling Save might work.
Any way I am thinking that the correct way to do this is through the ACL’s, which provide the basic security access and control whether a user has access to read or read/write a record.
What we would need to do is manipulate the handling of the ACL’s to make it conditional, dependent on data on the field. I see a way of doing this, which is by sub-classing the RecordHandler
class in custom and overriding the getRecord
method. But this is somewhat complex and it would take me quite some time to figure it out and explain it, and I am afraid I don’t have that much time