-
Notifications
You must be signed in to change notification settings - Fork 0
feat: platform roles reworked (AAI-467) #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
c18ebfc
feat: add role_name to platform - role that grants platform access in…
marius-mather a905e6c
fix: make sure name is unique on Auth0Role
marius-mather 711c940
test: update tests to include role_name for platform
marius-mather 94785e9
feat: add schemas for Auth0 role names
marius-mather 8419831
feat: methods to create platform from Åuth0 role
marius-mather cb87a2b
feat: sync task to populate platforms in the DB
marius-mather 524e27c
fix: add populating platforms to sync job
marius-mather 611b9cf
feat: add auth0 role when adding (approved) platform membership
marius-mather 59dcad9
feat: add role when creating user record in registration
marius-mather 792dba3
test: update tests to account for platform role
marius-mather d84f0ef
fix: include group id in 404 message
marius-mather e667be8
refactor: create a class for defining bundles
marius-mather f2199c9
fix: make sure we pass string IDs when getting database groups
marius-mather 641334a
test: update biocommons registration tests after refactor
marius-mather 1e594bd
fix: fix BPA registration to include Auth0 client when needed
marius-mather fb82382
test: update test of BPA registration
marius-mather a72b7a4
fix: add a default admin role when populating platforms
marius-mather 3faed19
fix: make platform role_name nullable: difficult to populate if it ha…
marius-mather 819608d
fix: add migration for platform role name
marius-mather ed18b84
fix: include auth0_client when creating galaxy membership
marius-mather 1cb5cc2
test: update tests of Galaxy registration
marius-mather c1ae4b8
fix: update SBP registration
marius-mather bfa2c67
test: update tests of SBP registration
marius-mather 77f085a
feat: add an endpoint to update platform admin roles
marius-mather 894fd42
test: test setting platform admin roles
marius-mather d5baffa
chore: style fix
marius-mather e192427
fix: need to provide an actual role when defining default platform ad…
marius-mather ab7e261
refactor: remove current platform role name migration
marius-mather 5e50829
refactor: make platform link to roles via role ID instead of name
marius-mather 152e417
refactor: undo unique on Auth0Role.name
marius-mather 4fba7a4
refactor: add updated migration for platform-role link
marius-mather 3042bf4
refactor: add commit arg to saving platform membership history
marius-mather 08f8a57
fix: use a memory jobstore for sync tasks in dev, sqlite doesn't like…
marius-mather 3c167ce
feat: add platform membership syncing, refactor group membership sync
marius-mather 8fdb598
feat: add platform sync to scheduled jobs
marius-mather fe54cd8
test: update tests after refactor
marius-mather c35b71b
fix: fix membership queries after refactoring - only get the current …
marius-mather 7b1bd62
test: add test of platform membership syncing
marius-mather a00a992
chore: remove print statement when job scheduler is waiting
marius-mather df75418
chore: improved log message for platform sync
marius-mather c50f00a
fix: fix task ID in scheduler
marius-mather 70d71e1
fix: use role ID when linking platform to role
marius-mather 95af1c7
fix: remove unused variable
marius-mather 06dc3d9
fix: use role ID when creating platform in tests
marius-mather 517c7ac
Merge branch 'feature/platform-roles' of github.com:AustralianBioComm…
marius-mather 6b4789f
fix: check for platform role when creating platform
marius-mather 730b10f
test: fixes for platform creation tests
marius-mather File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| """platform_roles | ||
| Revision ID: 4594b458279c | ||
| Revises: 6c9d1e8540be | ||
| Create Date: 2025-11-05 14:05:57.399804 | ||
| """ | ||
| from typing import Sequence, Union | ||
|
|
||
| from alembic import op | ||
| import sqlalchemy as sa | ||
| import sqlmodel | ||
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = '4594b458279c' | ||
| down_revision: Union[str, None] = '6c9d1e8540be' | ||
| branch_labels: Union[str, Sequence[str], None] = None | ||
| depends_on: Union[str, Sequence[str], None] = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.add_column('platform', sa.Column('role_id', sqlmodel.sql.sqltypes.AutoString(), nullable=True)) | ||
marius-mather marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| op.create_foreign_key(op.f('fk_platform_role_id_auth0role'), 'platform', 'auth0role', ['role_id'], ['id'], ondelete='SET NULL') | ||
| # ### end Alembic commands ### | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_constraint(op.f('fk_platform_role_id_auth0role'), 'platform', type_='foreignkey') | ||
| op.drop_column('platform', 'role_id') | ||
| # ### end Alembic commands ### | ||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.