Allow users with RoleX to edit a field, while all others can only read it.
The simplest way is to create two fields. FieldA is editable text (or number or whatever). Hide the field if the user is NOT a member of RoleX say. Now create FieldB, set it as computed and equal to FieldA, hide this field is the user IS a member of RoleX. Now anyone without RoleX will see the computed, uneditable fieldB, while those who have RoleX will see the editable version, fieldA.
It's that simple.