Repository navigation
feat: show organization name for groups on user profile - #14448
Conversation
There was a problem hiding this comment.
Use sqlc.embed, and another idea is to rope GetGroupByID and GetGroupsByOrgAndName into the GetGroups query.
It feels weird, but it guarantees 1 fetch query on the backend, and therefore 1 group type.
I did this with OrganizationMembers and use a wrapper func to convert the :Many to :One query:
coder/coderd/httpmw/organizationparam.go
Lines 123 to 126 in e000bd1
The alternative is making a view, but those are kinda a pain to maintain with migrations. I'll let you make that call based on where the types are used. It is just annoying to have database.GetGroupRow and database.Group types in the BE sometimes.
I am not against this, but it sounds like it might be a little out of my comfort zone, and probably big enough for a PR of its own |
Definitely agree. This is one of the reasons row-typing can be really nice on the backend, but we're not replacing Go anytime soon. :p |
Closes #14213
Show the organization the group is from on the user profile page for multi-org deployments