code fmt
- preparing for api/turn-read-only and api/turn-writeable 
- some JS code refactoring
supports:
- api/set-read-only
- api/set-writeable
supported by web (instance settings dialog)