[h2] Re: Get user's roles and role's users

2024-03-30 Thread Evgenij Ryazanov
Hi! Take a look on GRANTEE and GRANTEDROLE columns in non-standard INFORMATION_SCHEMA.RIGHTS table where GRANTEETYPE = 'USER' and GRANTEDROLE IS NOT NULL. Please note that a role can be granted to another role. These records have GRANTEETYPE = 'ROLE' and GRANTEDROLE IS NOT NULL. Users have tr

[h2] Get user's roles and role's users

2024-03-30 Thread prrvchr
Hi all, I'm looking to get the users of a role as well as the roles of a user. I can do this with HsqlDB with the following two queries respectivly: - SELECT GRANTEE FROM INFORMATION_SCHEMA.ROLE_AUTHORIZATION_DESCRIPTORS WHERE ROLE_NAME=? - SELECT ROLE_NAME FROM INFORMATION_SCHEM