-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #611 from SwissDataScienceCenter/private-resource-…
…permission feat: Adding new relation for listing private-only entities
- Loading branch information
Showing
6 changed files
with
234 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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
36 changes: 36 additions & 0 deletions
36
...ents/renku_data_services/migrations/versions/239854e7ea77_add_non_public_read_relation.py
This file contains 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,36 @@ | ||
"""Add non-public-read relation | ||
Revision ID: 239854e7ea77 | ||
Revises: d71f0f795d30 | ||
Create Date: 2025-01-17 14:34:47.305393 | ||
""" | ||
|
||
import logging | ||
|
||
from renku_data_services.authz.config import AuthzConfig | ||
from renku_data_services.authz.schemas import v5 | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "239854e7ea77" | ||
down_revision = "d71f0f795d30" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
config = AuthzConfig.from_env() | ||
client = config.authz_client() | ||
responses = v5.upgrade(client) | ||
logging.info( | ||
f"Finished upgrading the Authz schema to version 5 in Alembic revision {revision}, response: {responses}" | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
config = AuthzConfig.from_env() | ||
client = config.authz_client() | ||
responses = v5.downgrade(client) | ||
logging.info( | ||
f"Finished downgrading the Authz schema from version 5 in Alembic revision {revision}, response: {responses}" | ||
) |
This file contains 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 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 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