-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: make migration view page #150
base: master
Are you sure you want to change the base?
Conversation
You should make the admin view operate like this.. https://github.com/CAVEconnectome/AnnotationFrameworkInfoService/blob/master/annotationinfoservice/admin.py |
There was a problem hiding this 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
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. |
materializationengine/admin.py
Outdated
) | ||
|
||
@expose("/migrate_annotation_schemas", methods=["POST"]) | ||
@auth_required |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Made a simple page to run migrations, we will need to secure it before merging