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

Permission graph does not support schemas with slashes #22047

Closed
alxnddr opened this issue Apr 25, 2022 · 3 comments · Fixed by #22090 or #22185
Closed

Permission graph does not support schemas with slashes #22047

alxnddr opened this issue Apr 25, 2022 · 3 comments · Fixed by #22090 or #22185
Assignees
Labels
Administration/Permissions Collection or Data permissions .Backend Priority:P2 Average run of the mill bug Type:Bug Product defects
Milestone

Comments

@alxnddr
Copy link
Member

alxnddr commented Apr 25, 2022

Describe the bug
Schemas like special_/_#_%_'__._&_>_:_ _end can't be added to the permissions graph because they got trimmed:

Metadata request contains the correct schema name starting with special_/
Screenshot 2022-04-26 at 01 54 05

Permissions graph returns a trimmed name
Screenshot 2022-04-26 at 01 54 26

To Reproduce
Steps to reproduce the behavior:

  1. Connect a database with a schema called special_/_#_%_'__._&_>_:_ _end
  2. Go to the permissions page and try setting data permissions for the schema

Expected behavior
Permissions graph contains full schema names

Information about your Metabase Installation:
Latest master

@qnkhuat
Copy link
Contributor

qnkhuat commented Apr 27, 2022

I'm fixing this in #22090

But I also found a bug in FE when I change Permissions Data Access Permission to Granular of a scheme with special characters, FE it'll fail because the schema name is not encoded.

Reproduce:

  1. Connect a database with a schema called special_/_#_%_'__._&_>_:_ _end
  2. Go to Admin -> Permissions -> Data
  3. Change Permissions of schema special_/_#_%_'__._&_>_:_ _end to Granular
22047.mov

@flamber flamber added this to the 0.43 milestone Apr 28, 2022
@qnkhuat
Copy link
Contributor

qnkhuat commented Apr 28, 2022

Reopen since we still have a bug in FE

@qnkhuat qnkhuat reopened this Apr 28, 2022
@flamber
Copy link
Contributor

flamber commented Apr 28, 2022

@alxnddr I think you can quickly fix this, since its likely very similar to the other FE fixes you did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Administration/Permissions Collection or Data permissions .Backend Priority:P2 Average run of the mill bug Type:Bug Product defects
Projects
None yet
3 participants