You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I wish we can add more e2e tests to our access control mechanism, but it would not be doable if without switching roles in the same session.
https://www.postgresql.org/docs/current/sql-set-role.html The command SET ROLE can allow us to switch to non-root users in the same session. Since it's only for testing purposes, we can only allow superusers to SET ROLE to other roles.
With SET ROLE, we can write tests such as granting a few privileges to a user and checking if it's indeed granted for the corresponding operations.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
@yezizp2012 Please share your thoughts if you don't think this feature is necessary..
The text was updated successfully, but these errors were encountered:
has_table_privilege ( [ user name or oid, ] table text or oid, privilege text ) → boolean
Does user have privilege for table? Allowable privilege types are SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, and TRIGGER.
The advantage is that we only need to check whether the privilege is granted or revoked, and not to do some real DDLs to verify it.
Is your feature request related to a problem? Please describe.
I wish we can add more e2e tests to our access control mechanism, but it would not be doable if without switching roles in the same session.
https://www.postgresql.org/docs/current/sql-set-role.html The command SET ROLE can allow us to switch to non-root users in the same session. Since it's only for testing purposes, we can only allow superusers to SET ROLE to other roles.
With SET ROLE, we can write tests such as granting a few privileges to a user and checking if it's indeed granted for the corresponding operations.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
@yezizp2012 Please share your thoughts if you don't think this feature is necessary..
The text was updated successfully, but these errors were encountered: