chore: merge organization member db queries (#13542)

Merge members queries into 1 that also joins in the user table for username.
Required to list organization members on UI/cli
This commit is contained in:
Steven Masley
2024-06-12 09:23:48 -10:00
committed by GitHub
parent 1ca5dc0328
commit de9e6889bb
18 changed files with 293 additions and 214 deletions

View File

@ -179,6 +179,10 @@ func (m OrganizationMember) RBACObject() rbac.Object {
WithOwner(m.UserID.String())
}
func (m OrganizationMembersRow) RBACObject() rbac.Object {
return m.OrganizationMember.RBACObject()
}
func (m GetOrganizationIDsByMemberIDsRow) RBACObject() rbac.Object {
// TODO: This feels incorrect as we are really returning a list of orgmembers.
// This return type should be refactored to return a list of orgmembers, not this