[DO NOT MERGE] Backend work for testing AAF integration work on aaf-dev tenant - #282
Draft
amandazhuyilan wants to merge 7 commits into
Draft
[DO NOT MERGE] Backend work for testing AAF integration work on aaf-dev tenant#282amandazhuyilan wants to merge 7 commits into
amandazhuyilan wants to merge 7 commits into
Conversation
amandazhuyilan
marked this pull request as draft
July 6, 2026 00:25
Merge main back to aaf-dev
* feat: add account_type field to BiocommonsUser * chore: add migration for account type * test: unit test enum handling for account_type * refactor: make app_metadata mandatory, but allow for Auth0 responses not including it * refactor: set account type when creating user from Auth0 data * fix: make migration compatible with sqlite * test: update tests with account_type * fix: set account type automatically when syncing exported users * test: factory functions for new schemas * test: update tests to reflect changed schemas * fix: add path_separator to alembic config to address deprecation warning * fix: add httpx2 for starlette test client * fix: bump starlette-admin to fix deprecation warning * fix: make sure account type enum is created in migration * feat: add account permissions for checking if user can change email/password etc * chore: apply account permission checks to password/username/email change endpoints * test: add unit test of endpoint permissions for AAF accounts * feat: add account type to export * test: update tests of export * feat: allow exporting users for specific connections * chore: allow testing workflows to run on all PRs, not just to main * feat: Auth0 client methods to get connections * fix: only sync DB connection users for now * chore: add pytest-sugar for better test output * test: factories for Auth0 connection data * test: tests of connection methods * fix: disable username change for AAF for now, needs more thought * test: update test of AAF change username
…4) (#294) * feat: allow filtering users by connection when searching by email * feat: updated schemas for AAF info * feat: link_identity method for Auth0Client * feat: record other user ID for users * feat: method to link account for BiocommonsUser * fix: linking_completed_at should be datetime * feat: dependency to check Auth0 action tokens * feat: router with initial /aaf/check-link endpoint * chore: include aaf router in main * refactor: use a base URL for Auth0 API calls * test: unit tests of new Auth0Client methods * test: unit tests of AAF link function * test: tests of require_action_token * test: unit tests of account linking endpoint * fix: get connection correctly when linking accounts * fix: skip linking if already done * fix: update app_metadata to mark user AAF only if no existing account * test: unit tests of app_metadata for AAF-only accounts * fix: handle errors when Auth0 already linked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.