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 Like

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 Like

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 Likes

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 Likes

Have you upgraded to pg12?

Have you migrated the database?

2 Likes

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 Likes

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.

https://github.com/discourse/discourse-data-explorer/pull/84/files

6 Likes

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