-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add annotation creation access flag #937
Conversation
@@ -58,6 +59,10 @@ def validateBoolean(doc): | |||
constants.PluginSettings.LARGE_IMAGE_ANNOTATION_HISTORY: True, | |||
}) | |||
|
|||
# Access flags | |||
|
|||
registerAccessFlag('createAnnots', 'Create annotations', 'Allow user to create annotations') |
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.
Can we define this access flag (the createAnnots
) in girder/girder_large_image/constants.py
(maybe at the root level of that modules as ANNOTATION_ACCESS_FLAG = 'large_image_create_annotations'
), and then use the constant instead of the explicit string?
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.
See 99ada00
Other than preferring a defined constant to a string, this looks good. |
Adds a new girder access flag which demarcates whether or not a user has permission to create annotations, allowing users to create annotations without having write access to a folder/item. Also creates a new endpoint indicating whether or not the user has creation permissions (via write access or the flag) and makes current annotation creation procedures check for the access flag.