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

Add support for view, sequence, column & function privileges #67

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

biodevc
Copy link

@biodevc biodevc commented May 14, 2021

Currently only TABLE privileges (aka roles, permissions) are handled.

This adds support for VIEWS, SEQUENCES, COLUMNS & FUNCTIONS.

Currently only table privileges are handled
@biodevc biodevc marked this pull request as draft May 14, 2021 03:10
@biodevc biodevc marked this pull request as ready for review May 14, 2021 03:11
@biodevc biodevc marked this pull request as draft May 14, 2021 03:12
@biodevc biodevc marked this pull request as ready for review May 14, 2021 03:15
@biodevc biodevc marked this pull request as draft May 14, 2021 06:20
@biodevc biodevc changed the title Include VIEWS in privileges (aka role, permission) Add support for view, sequence & column privileges (aka roles, permissions) May 14, 2021
@biodevc biodevc changed the title Add support for view, sequence & column privileges (aka roles, permissions) Add support for view, sequence & column privileges May 14, 2021
@biodevc biodevc marked this pull request as ready for review May 14, 2021 09:43
@biodevc biodevc changed the title Add support for view, sequence & column privileges Add support for view, sequence, column & function privileges May 14, 2021
@biodevc
Copy link
Author

biodevc commented May 14, 2021

I just saw that @michaelbeaumont had done the groundwork for function privs so copied and tweaked his query.
It should address #djrobstep/migra#64

@provokateurin
Copy link

Could you also add schema privileges? They are missing too.

@provokateurin
Copy link

I implemented the schema privileges. @biodevc could you pickup stack11@2107f08 in your PR?

@biodevc
Copy link
Author

biodevc commented Oct 28, 2021

I implemented the schema privileges. @biodevc could you pickup stack11@2107f08 in your PR?

Just added your mods but altered the query since it was producing wierd results for me

@provokateurin
Copy link

Huh what results? We've been using this patch in production and it always worked for us.

@biodevc
Copy link
Author

biodevc commented Jun 23, 2022

Huh what results? We've been using this patch in production and it always worked for us.

If a role has 'group' members and that role has priveleges granted to a schema, then with your query, all members of the role also get granted priveleges to the schema. So, it "works", but if a member is later removed from the top level role, they'll still have access to the schema.

@provokateurin
Copy link

@biodevc could you rebase?

@joshainglis
Copy link

A small change that is worth adding to this PR for function privileges to work (needs to include the function signature)
joshainglis@14a1d7a

@biodevc
Copy link
Author

biodevc commented Aug 22, 2022

@biodevc could you rebase?

I've given up hope of this pull request ever going anywhere. Migra appears to be a dead project at this stage.

@provokateurin
Copy link

yeah :( but i thought i saw a post somewhere about the maintainer working on these projects again.

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

Successfully merging this pull request may close these issues.

None yet

3 participants