Add grant scope IDs to role list (#4893)

This adds grant_scope_ids in the output of role listing. The lookup for grant scope IDs was changed to allow taking in a set of roles instead of just a single role, and the results are collated afterwards.

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
This commit is contained in:
Jeff MitchellandJohan Brandhorst-Satzkorn authored and GitHub committed 2024-06-25 13:05:52 -04:00
1 parent d43565038f
commit 4e0c2d79ac
8 files changed
+58 -14

No files matched your search

+1
View File
@@ -216,6 +216,7 @@ func TestRole(t testing.TB, conn *db.DB, scopeId string, opt ...Option) *Role {
gs, err := NewRoleGrantScope(ctx, id, gsi)
require.NoError(err)
require.NoError(rw.Create(ctx, gs))
role.GrantScopes = append(role.GrantScopes, gs)
}
require.Equal(opts.withDescription, role.Description)
require.Equal(opts.withName, role.Name)