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

Privileges thoughts #3

Closed
sckott opened this issue Oct 18, 2024 · 2 comments
Closed

Privileges thoughts #3

sckott opened this issue Oct 18, 2024 · 2 comments

Comments

@sckott
Copy link
Member

sckott commented Oct 18, 2024

Question is: is there anything we can do to make privileges easier?

Postgres docs: https://www.postgresql.org/docs/current/ddl-priv.html

Taking some inspiration from https://github.com/codenize-tools/gratan?tab=readme-ov-file#grantfile-example one could do something like this

# for the grant statement of (where table name is "passwd")
dbExecute(con, "GRANT UPDATE
  (pwhash, real_name, home_phone, shell)
  ON passwd TO public"
)

# we could have (using NSE)
user(public) %>% 
  on(passwd, columns(pwhash, real_name, home_phone, shell)) %>% 
  grant(update)

though I think our little DSL would only want to handle simple cases if we do it

@sckott
Copy link
Member Author

sckott commented Oct 21, 2024

work on priv branch https://github.com/getwilds/rls/tree/priv

@sckott
Copy link
Member Author

sckott commented Nov 4, 2024

closing - subsumed within #4

@sckott sckott closed this as completed Nov 4, 2024
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

1 participant