Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panel says You don't have permission to access this, (intermediate value).map is not a function #4

Open
want2know2 opened this issue Jun 20, 2024 · 2 comments

Comments

@want2know2
Copy link

want2know2 commented Jun 20, 2024

I installed the extension on the following system:
Windows 10 + wsl 2 Ubuntu (WSL-Version: 2.1.5.0, Kernelversion: 5.15.146.1-2, WSLg-Version: 1.0.60, MSRDC-Version: 1.2.5105, Direct3D-Version: 1.611.1-81528511, DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp, Windows-Version: 10.0.19045.4529)
Docker Desktop 4.30.0
Directus 10.12.1

In my data model I've already created collections like "Projekte", "Produkte" and such for testing purposes.

When I now create a SQL field in Insights and type a simple query like SELECT name FROM produkte;, the Panel then says You don't have permission to access this. And, when I save the Dashboard, it says (intermediate value) (intermediate value) (intermediate value).map is not a function.

I am logged in as admin who created the Directus instance and I gave permission to all collections and all system collections. What other permissions can there be needed? What am I doing wrong?

@u12206050
Copy link
Member

The only checks that are made is if you are logged in and if the requesting user has access to that particular panel. Since you are admin it should work. Haven't tested it on 10.12 yet though.

@want2know2
Copy link
Author

want2know2 commented Jun 21, 2024

Hmm.. I'd thought so, too. I've tried some things, but I'm too much of a noob anyway to make sense of this. I'm using sqlite3 as database, in case that might play a role.

So, I've created a new table after the extension was installed, then

1
  • created an SQL query panel
  • put SELECT * FROM testtable; into the SQL query panel in settings (kind of the same as in my first post, but with a newly created table)
  • saved the SQL query panel

In the Dashboard the panel then shows You don't have permission to access this.

  • saved the Dashboard

In the Dashboard the panel then shows (intermediate value) (intermediate value) (intermediate value).map is not a function.

Log in Docker
2024-06-20 13:42:00 [11:42:00] PATCH /users/me/track/page 204 28ms
2024-06-20 13:42:00 [11:42:00] GET /insights/query/_b4vO48Nfbla_Smohb23O4 400 20ms
2024-06-20 13:43:06 [11:43:05] POST /panels 200 80ms
2024-06-20 13:43:06 [11:43:05] DELETE /panels 204 75ms
2024-06-20 13:43:06 [11:43:05] PATCH /panels 200 83ms
2024-06-20 13:43:06 [11:43:05] GET /panels?fields[]=*&sort[]=dashboard&limit=-1 200 28ms
2024-06-20 13:43:06 [11:43:05] GET /dashboards?fields[]=*&sort[]=name&limit=-1 200 34ms
2024-06-20 13:43:06 [11:43:06] GET /insights/query/2acaefa7-ecea-4540-b1ed-04976779da51 400 39ms
2
  • created an SQL query panel
  • left the SQL query blank in the SQL query panel's settings
  • saved the SQL query panel

In the Dashboard the panel then shows You don't have permission to access this.

  • saved the Dashboard

In the Dashboard the panel then shows cannot read properties of undefined (reading 'replace').

Log in Docker
2024-06-20 13:30:55 [11:30:55] PATCH /panels 200 109ms
2024-06-20 13:30:55 [11:30:55] GET /panels?fields[]=*&sort[]=dashboard&limit=-1 200 35ms
2024-06-20 13:30:55 [11:30:55] GET /dashboards?fields[]=*&sort[]=name&limit=-1 200 43ms
2024-06-20 13:30:55 [11:30:55] POST /graphql 200 206ms
2024-06-20 13:30:56 [11:30:56] GET /insights/query/efe771ad-d510-4895-a159-8cbba38799c3 400 35ms
3
  • created an SQL query panel
  • put SELECT 1; into the SQL query panel in settings
  • saved the SQL query panel

In the Dashboard the panel then shows You don't have permission to access this.

  • saved the Dashboard

In the Dashboard the panel then shows cannot read properties of undefined (reading 'length').

Log in Docker
2024-06-22 00:36:58 directus-1  | [22:36:57] PATCH /users/me/track/page 204 33ms
2024-06-22 00:36:58 directus-1  | [22:36:57] GET /insights/query/_GFQjsWKC6faVdrIeHCNBP 400 15ms
2024-06-22 00:37:02 directus-1  | [22:37:02] POST /panels 200 82ms
2024-06-22 00:37:02 directus-1  | [22:37:02] DELETE /panels 204 96ms
2024-06-22 00:37:02 directus-1  | [22:37:02] PATCH /panels 200 101ms
2024-06-22 00:37:02 directus-1  | [22:37:02] GET /panels?fields[]=*&sort[]=dashboard&limit=-1 200 31ms
2024-06-22 00:37:02 directus-1  | [22:37:02] GET /dashboards?fields[]=*&sort[]=name&limit=-1 200 39ms
2024-06-22 00:37:02 directus-1  | [22:37:02] POST /graphql 200 199ms
2024-06-22 00:37:03 directus-1  | [22:37:03] GET /insights/query/70d11909-ab10-48fb-979b-03f820a6b18a 400 20ms

Unfortunately, I have no point at which I can start to locate or even solve the problem. Idk, maybe this is telling to you in any way that it isn't to me. Anyway, thanks for your reply regardless!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants