Commit a92fe7cb authored by Randall Leeds's avatar Randall Leeds

Merge pull request #1585 from hypothesis/fix-replies

Only add the public principal to the annotation
parents da17c8cc 170d438f
...@@ -160,13 +160,13 @@ AnnotationController = [ ...@@ -160,13 +160,13 @@ AnnotationController = [
# Construct the reply. # Construct the reply.
references = [references..., id] references = [references..., id]
# If replying to a public annotation make the response public. reply = {references, uri}
if 'group:__world__' in model.permissions.read or []
permissions = {read: ['group:__world__']}
reply = {references, uri, permissions}
annotator.publish 'beforeAnnotationCreated', reply annotator.publish 'beforeAnnotationCreated', reply
# If replying to a public annotation make the response public.
if 'group:__world__' in (model.permissions.read or [])
reply.permissions.read.push('group:__world__')
###* ###*
# @ngdoc method # @ngdoc method
# @name annotation.AnnotationController#render # @name annotation.AnnotationController#render
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment