Skip to content

Conversation

@minh-biocommons
Copy link
Collaborator

@minh-biocommons minh-biocommons commented Nov 18, 2025

Description

AAI-378: Added endpoint for checking admin groups (bundle)

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit / integration tests that prove my fix is effective or that my feature works
  • I have run all tests locally and they pass
  • I have updated the documentation (if applicable)
  • For any new secrets, I have updated the shared spreadsheet and the GitHub Secrets.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new endpoint /me/groups/admin-roles that allows users to retrieve a list of groups for which they have admin privileges. This complements the existing /me/platforms/admin-roles endpoint and follows a similar pattern.

Key changes:

  • Added GroupAdminData response model to filter group fields returned by the API
  • Implemented get_admin_groups endpoint that queries groups based on user roles
  • Added comprehensive test coverage for the new endpoint

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
routers/user.py Adds new endpoint /groups/admin-roles with filtered response model and imports BiocommonsGroup model
tests/test_user.py Adds comprehensive test case test_get_admin_groups that validates endpoint behavior, response filtering, and permission checks

@marius-mather marius-mather changed the title feat: Added endpoint for checking admin groups (AAI-378) feat: added endpoint for checking admin groups (AAI-378) Nov 18, 2025
Copy link
Collaborator

@marius-mather marius-mather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this all looks great (including the improvement for the platform admin response), thanks!

@minh-biocommons minh-biocommons merged commit 8a01345 into main Nov 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants