Read Only Error Disable

I have a project that I want to make read only based on hostname. I use…

system.util.setConnectionMode(2)

Is there any way to prevent the error box from opening when someone tries to write?

This is more a work around, but also good practice. I would instead set the enabled state on your components to disabled when the user doesn’t have the access. To that end, I would create a client tag and write that to 0 when you want to disable all write actions. Then you would add this to your enable bindings of all relevant components. Of course, this could be a little bit of work, depending on how large your project is, but will result in better clarity to the user. I would also add a label somewhere in the banner to indicate that write permissions are globally turned off as well, so they know what’s going on