Conversation
|
You should make the admin view operate like this.. https://github.com/CAVEconnectome/AnnotationFrameworkInfoService/blob/master/annotationinfoservice/admin.py |
fcollman
left a comment
There was a problem hiding this comment.
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.
shouldn't this require admin?
There was a problem hiding this comment.
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