Skip to content

Conversation

@amandazhuyilan
Copy link
Contributor

@amandazhuyilan amandazhuyilan commented Nov 12, 2025

Description

AAI-385: Ensure revoking a platform membership also removes the user’s Auth0 role, mirroring the existing group‑revocation behavior completed in #109).

This pull request depends on #122.

Changes

  • added PlatformMembership.revoke_auth0_role/revoke helpers that remove the biocommons/platform/* role in Auth0, persist revoked state, and log whether a role change occurred
  • PlatformMembership.save_history now persists user_id explicitly so revocation history rows satisfy the NOT NULL constraint.
  • Admin revoke endpoint now injects Auth0Client, delegates to the new helper, and logs the Auth0 result; admin fixtures were adjusted to include platform role
  • Extended tests

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.

@amandazhuyilan amandazhuyilan marked this pull request as draft November 12, 2025 03:39
@amandazhuyilan amandazhuyilan changed the title fix: revoke platform access properly feat: revoke service access for users Nov 12, 2025
@amandazhuyilan amandazhuyilan force-pushed the revoke-users-from-services branch from bace7cf to 05b7617 Compare November 12, 2025 23:59
@amandazhuyilan amandazhuyilan marked this pull request as ready for review November 13, 2025 00:00
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.

looks good, thanks

@amandazhuyilan amandazhuyilan merged commit 29d4f21 into main Nov 13, 2025
4 checks passed
@amandazhuyilan amandazhuyilan deleted the revoke-users-from-services branch November 13, 2025 00:18
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