-
Notifications
You must be signed in to change notification settings - Fork 0
Provider admin #75
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
Provider admin #75
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1625acd
test: fix failing user route test
chrisarridge f14659c
feat: provider admin database models and code in FGA provider
chrisarridge 277a3b8
feat: FGA validator changes to implement provider admin
chrisarridge ad25e7d
feat: change endpoint code to work with provider admin.
chrisarridge f1e85b7
test: dataset patch endpoint tests for changing dataset visibility
chrisarridge e5326bb
bump: version bump
chrisarridge 7828b16
docs: update CHANGELOG
chrisarridge 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
73 changes: 73 additions & 0 deletions
73
alembic/versions/22951c5f0f0c_added_provider_admin_tables.py
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,73 @@ | ||
| """Added provider admin tables | ||
|
|
||
| Revision ID: 22951c5f0f0c | ||
| Revises: ec6411d99e0b | ||
| Create Date: 2026-04-15 14:50:44.448674 | ||
|
|
||
| """ | ||
|
|
||
| from typing import Sequence, Union | ||
|
|
||
| import sqlalchemy as sa | ||
| import sqlmodel | ||
| from alembic import op | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = "22951c5f0f0c" | ||
| down_revision: Union[str, Sequence[str], None] = "ec6411d99e0b" | ||
| branch_labels: Union[str, Sequence[str], None] = None | ||
| depends_on: Union[str, Sequence[str], None] = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| """Upgrade schema.""" | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.create_table( | ||
| "tooldbmodel", | ||
| sa.Column("id", sa.Uuid(), nullable=False), | ||
| sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
| sa.Column("provider", sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
| sa.PrimaryKeyConstraint("id"), | ||
| ) | ||
| op.create_table( | ||
| "tooladminuserdbmodel", | ||
| sa.Column("id", sa.Uuid(), nullable=False), | ||
| sa.Column("tool", sa.Uuid(), nullable=False), | ||
| sa.Column("user", sa.Uuid(), nullable=False), | ||
| sa.ForeignKeyConstraint( | ||
| ["tool"], | ||
| ["tooldbmodel.id"], | ||
| ), | ||
| sa.PrimaryKeyConstraint("id"), | ||
| ) | ||
| op.create_index(op.f("ix_tooladminuserdbmodel_tool"), "tooladminuserdbmodel", ["tool"], unique=False) | ||
| op.create_index(op.f("ix_tooladminuserdbmodel_user"), "tooladminuserdbmodel", ["user"], unique=False) | ||
| op.create_table( | ||
| "toolauthorisationdbmodel", | ||
| sa.Column("id", sa.Uuid(), nullable=False), | ||
| sa.Column("tool", sa.Uuid(), nullable=False), | ||
| sa.Column("reporting_org", sa.Uuid(), nullable=False), | ||
| sa.ForeignKeyConstraint( | ||
| ["tool"], | ||
| ["tooldbmodel.id"], | ||
| ), | ||
| sa.PrimaryKeyConstraint("id"), | ||
| ) | ||
| op.create_index( | ||
| op.f("ix_toolauthorisationdbmodel_reporting_org"), "toolauthorisationdbmodel", ["reporting_org"], unique=False | ||
| ) | ||
| op.create_index(op.f("ix_toolauthorisationdbmodel_tool"), "toolauthorisationdbmodel", ["tool"], unique=False) | ||
| # ### end Alembic commands ### | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| """Downgrade schema.""" | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_index(op.f("ix_toolauthorisationdbmodel_tool"), table_name="toolauthorisationdbmodel") | ||
| op.drop_index(op.f("ix_toolauthorisationdbmodel_reporting_org"), table_name="toolauthorisationdbmodel") | ||
| op.drop_table("toolauthorisationdbmodel") | ||
| op.drop_index(op.f("ix_tooladminuserdbmodel_user"), table_name="tooladminuserdbmodel") | ||
| op.drop_index(op.f("ix_tooladminuserdbmodel_tool"), table_name="tooladminuserdbmodel") | ||
| op.drop_table("tooladminuserdbmodel") | ||
| op.drop_table("tooldbmodel") | ||
| # ### 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
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
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.
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.