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

Fix schema permission apply and add sequence support. #563

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

vdboor
Copy link
Contributor

@vdboor vdboor commented Sep 26, 2024

  • Adds grants to sequences
  • Fixes nested/through tables.

The old get_all_dataset_scopes() walked twice over nested/through tables, and gave it the dataset permissions too (instead of the field permissions). This was visible when refactoring the code, and unit tests confirmed. Hence the list of generated GRANT statements is now included in the tests.

… funciton call

The only difference is not passing a paremter (defaulting to None).
This allows passing table-type so sequence permissions can also be assigned later.

Fix passing auth-permissions to through/nested tables. The nested table
permissions were redefined by looping over the full tables, which
didn't receive the field.auth data but exposed dataset auth instead.
Also there is no need to define auth on their fields if the full table
has auth set.
This should fix pg_dump on our databases, which insists on reading the sequences too.
@vdboor vdboor changed the title Fix schema permission apply. Fix schema permission apply and add sequence support. Sep 26, 2024
@vdboor vdboor merged commit ebf05ce into master Oct 1, 2024
7 checks passed
@vdboor vdboor deleted the diederik/fix-database-permissions branch October 1, 2024 10:27
@vdboor
Copy link
Contributor Author

vdboor commented Oct 1, 2024

Gecheckt, in de praktijk had dit alleen effect op brk.kadastraleobjecten.soortCultuurBebouwd. En brk2 is de vervanger hiervan.

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

Successfully merging this pull request may close these issues.

2 participants