For example, if you do a setPref() on a gadget in a shared, but not editable dashboard, it will actually succeed, and even if you read the values back you will get what you set.
If you then reload the page, you get back the previous prefs values. Jira seems to be caching the values when the gadgets setPref is called, but silently failing on persisting the prefs to the database. I tried writing a pref and reading it back figuring I’d get the previous value in the read-only case to use that as a test for the read-only cause, but Jira happily returns the newly set value.
I need to be able to determine if the user has edit access to the dashboard, and then disallow operations that will attempt to set gadget prefs, effectively putting the gadget in a “read-only” mode. I see no way to do this, or even find information that would allow me to make REST calls to the underlying platform to determine anything about the dashboard the gadget is embedded in.