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

database_privileges.set_for_roles #3773

Closed
Tracked by #3639
pavish opened this issue Aug 21, 2024 · 2 comments · Fixed by #3781
Closed
Tracked by #3639

database_privileges.set_for_roles #3773

pavish opened this issue Aug 21, 2024 · 2 comments · Fixed by #3781

Comments

@pavish
Copy link
Member

pavish commented Aug 21, 2024

database_id;
set_privileges: [
  {
     role_oid;
     privileges: SET<CONNECT|CREATE|TEMPORARY>
  },
  {
     role_oid;
     privileges: SET<CONNECT|CREATE|TEMPORARY>
  }
]

Should return Array<DatabasePrivileges>

DatabasePrivileges from #3662

@pavish pavish changed the title databases_privileges.set_for_role (database_id, role_oid, privileges: privilege[]) => RoleInfo databases_privileges.set_for_role (database_id, role_oid, privileges: SET<CONNECT|CREATE|TEMPORARY>) => RoleInfo Aug 21, 2024
@pavish pavish changed the title databases_privileges.set_for_role (database_id, role_oid, privileges: SET<CONNECT|CREATE|TEMPORARY>) => RoleInfo database_privileges.set_for_role (database_id, role_oid, privileges: SET<CONNECT|CREATE|TEMPORARY>) => RoleInfo Aug 21, 2024
@pavish pavish changed the title database_privileges.set_for_role (database_id, role_oid, privileges: SET<CONNECT|CREATE|TEMPORARY>) => RoleInfo database_privileges.set_for_roles Aug 21, 2024
@mathemancer
Copy link
Contributor

I did some quick tests to make sure we can do this transactionally. Good news: We can!

So, I think we're good to proceed with this function.

@mathemancer
Copy link
Contributor

@pavish I updated the spec just a bit to simplify it and make it consistent with other similar functions:

database_id: <int>
privileges: [
  {
     role_oid: <int>,
     direct: SET<CONNECT|CREATE|TEMPORARY>
  },
  {
     role_oid: <int>,
     direct: SET<CONNECT|CREATE|TEMPORARY>
  },
  ...
]

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 a pull request may close this issue.

2 participants