send annotation notification only for visible comments
This commit is contained in:
parent
523ac1df8b
commit
916c05d6e5
|
@ -4,6 +4,7 @@ import gr.cite.annotation.authorization.AuthorizationFlags;
|
|||
import gr.cite.annotation.authorization.OwnedResource;
|
||||
import gr.cite.annotation.authorization.Permission;
|
||||
import gr.cite.annotation.authorization.authorizationcontentresolver.AuthorizationContentResolver;
|
||||
import gr.cite.annotation.common.enums.AnnotationProtectionType;
|
||||
import gr.cite.annotation.common.enums.IsActive;
|
||||
import gr.cite.annotation.common.scope.user.UserScope;
|
||||
import gr.cite.annotation.data.AnnotationEntity;
|
||||
|
@ -95,7 +96,7 @@ public class AnnotationServiceImpl implements AnnotationService {
|
|||
|
||||
this.entityManager.flush();
|
||||
|
||||
this.sendAnnotationCreatedEvent(data);
|
||||
if (data.getProtectionType().equals(AnnotationProtectionType.EntityAccessors)) this.sendAnnotationCreatedEvent(data);
|
||||
|
||||
return this.builderFactory.builder(AnnotationBuilder.class).authorize(EnumSet.of(AuthorizationFlags.None)).build(BaseFieldSet.build(fields, Annotation._id), data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue