Skip to content

Conversation

@dlbrittain
Copy link
Collaborator

Made a simple page to run migrations, we will need to secure it before merging

@dlbrittain dlbrittain requested a review from fcollman June 13, 2024 17:06
@fcollman
Copy link
Collaborator

Copy link
Collaborator

@fcollman fcollman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to properly protect as having dataset admin priv

@dlbrittain
Copy link
Collaborator Author

I think I got this to work, though I added a 403.html redirect but it does not seem to work, do I will keep trying. It seems to only show the migration tab if the user has admin privileges, otherwise it seems to hide the tab, need to confirm with more testing. I might just remove the 403 page.

)

@expose("/migrate_annotation_schemas", methods=["POST"])
@auth_required
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this require admin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tested it if the user is not an admin it hides the migration tab in the admin view, but we should use the decorator as well, I forgot about the auth requires admin decorator, simple fix.

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