You can set custom visibility on a row based on an enum. To do this, select a cell in that row, right click and choose 'Select Row'. After that right click again on the row and press 'Set conditional formatting...'. This will give you a screen where you can choose an enum to base the row visibility on.
You could make 2 rows, one with a read-only field that is shown for a certain enum value, the other row with an editable field that is shown for the other enum value(s).
Be careful though as this is in no way a means for security, it is only for usability.
In addition to what Robert is saying, you can actually also set a widget to read-only using enums. Right click a widget (for example a text box) and select 'set conditional formatting'. Currently this is not an option for all widget types though.
In version 2.5 of the framework, this feature will be expanded and renamed to 'condition for visible' and 'condition for editable'