The data explorer is only available to admins

After update our forum we got the following message on the data-explorer plugin

The data explorer is only available to admins.

Could you please help us to fix an issue

إعجاب واحد (1)

I just did an upgrade and don’t have this problem. Are you sure that the user trying to access data-explorer is an admin?

إعجاب واحد (1)

Sure. I have admin permission

I have seen this bug due to the rate limiter… if you wait 10 seconds and reload the page does data explorer show up.

3 إعجابات

I did it but not luck

I’m getting this same error. I’m running 2.6.0.beta2 as development version.

When I enable the plugin and try to access it at /admin/plugins/explorer, I get this console message:

Warning: no type cast defined for type “name” with oid 19. Please cast this type explicitly to TEXT to be safe for future changes.

إعجابَين (2)

Have you upgraded to pg12?

Have you migrated the database?

إعجابَين (2)

No, I didn’t change anything.

In fact, I just installed a new instance ( 2.6.0.beta3 / docker 19.03.13 / on Debian bullseye) and get the warning right away when running d/rake autospec or trying to access the plugin. I don’t know if it’s related in any way, but that’s the only warning i see.

Taking a look, the “The data explorer is only available to admins.” message shows up for any error encountered while loading up the page.

https://github.com/discourse/discourse-data-explorer/blob/master/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6#L33-L37

This was sensible when there was a very small list of things that could go wrong, but the fix here is probably better clientside error reporting.

6 إعجابات

Change is up - the existing text is now triggered by an explicit check of admin permissions, and standard error handling is used for any failed requests.

6 إعجابات

This topic was automatically closed after 2 days. New replies are no longer allowed.