Apologies, this function is not yet implemented. Alternatively, we have implement a REST API to check if read-only mode is enabled (still to be documented). The concern we have with the REST API is that we do not want to be calling this and waiting for a response before performing an action as this could cause a performance degradation over slow networks. The two main cases to cater for are as follows:
- User is viewing a page before read-only mode is enabled. The user clicks a button resulting in a dialog appearing (e.g. the create dialog). Whilst it would be ideal to stop the dialog appearing, adding the REST call here would slow down the user experience. Instead, (in this example) we wait for the response on available spaces, or the user to attempts to create a page. We use this existing call which will return a 403 response and status/message (details to be confirmed). The ideal outcome is that the feature handles this response and displays the error message to the user.
- User open a page after read-only mode has been enabled. In this case, it is preferable to hide/disable the feature using the web item example provided.
I hope this helps, and happy to discuss your example to ensure that we have provided the necessary hooks to make it work nicely.
Adam - PM