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

Revoking privileges from RBAC roles using v_generate_user_grant_revoke_ddl #654

Open
redthor opened this issue Nov 25, 2022 · 0 comments
Open

Comments

@redthor
Copy link

redthor commented Nov 25, 2022

When attempting to DROP ROLE my_role I received the error:

[55006] ERROR: role "my_role" cannot be dropped because the role has a privilege on some object

It would be great if we could use the v_generate_user_grant_revoke_ddl.sql script to generate the same content we can for users and groups, e.g:

SELECT ddl
FROM admin.v_generate_user_grant_revoke_ddl
WHERE ddltype = 'revoke'
  AND (grantee = 'my_role' OR grantor = 'my_role')
ORDER BY objseq, grantseq DESC;

This might be similar to: #620

Without this do you know how we can find the privileges a role has?

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