getGroupMembers API in koji hub is currently gated behind the admin permission. However, the same results can easily be had with a single queryHistory call. I'd like to request that getGroupMembers become a simple anonymous listing call.
I'd also like to request the addition of an anonymous getUserGroups call. While it is also possible to find these relationships from queryHistory, the correlation has to happen on the client side (as the user field of the query filters the name of the group, not the members of the group). I see that there is already a function in the kojihub.auth module that does this (for policy checks to use) named get_user_groups
This is becoming something that is useful in deployments that might use policy checks based on groups rather than permissions, and where there might be some facility which keeps certain groups up-to-date from an external data source. In those situations checking group membership becomes nearly as common as permissions
@mikem any objections?
Metadata Update from @tkopecek: - Custom field Size adjusted to None
I put together PR #3912 for this. I'm not sure if you'll agree with the bare-bones results of the getUserGroups return or if you think more fields should be merged in. Please let me know if I missed any testing coverage.
Do you think that this approach would be reasonable for 1.35?
Metadata Update from @tkopecek: - Issue set to the milestone: 1.35
I rebased my PR the other day, and also reworked it slightly so that there's a bit less code duplication. I'm not terribly attached to my approach, if you have an alternative format you'd prefer.
Metadata Update from @mikem: - Issue tagged with: testing-ready
Metadata Update from @mfilip: - Issue tagged with: testing-done
Commit 3dd76652 relates to this ticket
Metadata Update from @tkopecek: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/3900
Please continue any further discussion there.