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.

6 Likes

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