-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Implement database_privileges.list_direct
RPC endpoint.
#3750
Conversation
@pavish Assuming that owners are considered a direct role, I have made a slight tweak to the response suggested in the issue, the tweak being that the
|
I think it's fine to add the default privileges of the owning role to the response when acl is null.
For the beta, based on the UX we have, this isn't required. We will have the owner information from
This would make it more consistent but I don't think we need to do this for the beta. |
db/sql/00_msar.sql
Outdated
pg_catalog.pg_roles AS pgr, | ||
pg_catalog.pg_database AS pgd, | ||
aclexplode(COALESCE(pgd.datacl, acldefault('d', pgd.datdba))) AS acl | ||
WHERE pgd.oid=msar.get_db_oid(db_name) AND pgr.oid = acl.grantee AND pgr.rolname NOT LIKE 'pg_' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we require an additional call here?
We could use pgd.datname = db_name
instead of pgd.oid=msar.get_db_oid(db_name)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Really nice work, @Anish9901 !
Fixes #3662
Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin