Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0.0.3-maintenance
  • 1.0-maintenance
  • 2.0-maintenance
  • AOU-1412_Add_checksum_of_DataFile_when_importing_in_Fedora
  • HBO-test-jenkins-library
  • HCA-PortingSolidify-3.2
  • HCA-PortingSolidify-3.5
  • adf-1418-do-not-index-certain-files
  • adf-1464-job-clean-download-files
  • adf-1867-list-publications-stats
  • adf-763-1127-improve-license-mapping-during-imports
  • adf-907-notifications-mark-as-read
  • adf-956-add-imprimatur-and-mode-de-diffussion-for-thesis
  • adf-956-new-document-types-imprimatur-and-mode-de-diffusion
  • adf-979-add-depositor-in-notifications-email
  • adf-squash-commits-jb
  • adf-validator-name
  • aou-1512_fix_coherence_orders_for_indexed_structures
  • contributors-with-names
  • jbc-bibliography-tmpl
  • jbc-csl-correctionsDD
  • jbc-update-coverpage
  • master
  • remove-not-neccessary-ExtendWith-annotations
  • rod-refactor-fedora-storage-get-datastream-index
  • rodn-113-indexing-service
  • rodn-1136-author-can-send-in-validation
  • rodn-1253-fix-validator-comments-notifications
  • rodn-1634-bibliography-add-sort-by-validation-date
  • rodn-1829-scheduled-task-to-export-to-orcid
  • rodn-833-add-validation-rules-before-submit
  • rodn-access-contributor-by-orcid-old
  • rodn-finalize-swiss-library-exports-task
  • rodn-fix-IT
  • rodn-improve-access-it
  • rodn-index-contributors-without-director
  • rodn-index-fix-indexing-with-large-fulltext
  • rodn-index-subtype-code
  • rodn-language-refactoring
  • rodn-merge-users-it
  • rodn-orcid-export-master-with-other-id
  • rodn-orcid-solidify-webhooks
  • rodn-prevent-hibernate-circular-exception
  • rodn-refactor-labels
  • rodn-search-accent-insensitive
  • rodn-shared-reference-to-collection-debug
  • rodn-solidify-3.5
  • rodn-solidify-es-8
  • rodn-use-index-to-find-validable-publications
  • rodn-use-solidify-global-banner
  • unit-test-bibtex-escaper
  • aou-0.0.1
  • aou-0.0.2
  • aou-0.0.3
  • aou-0.0.3-patch1
  • aou-0.0.4
  • aou-0.0.5
  • aou-1.0.0
  • aou-1.0.1
  • aou-1.0.10
  • aou-1.0.11
  • aou-1.0.12
  • aou-1.0.13
  • aou-1.0.14
  • aou-1.0.15
  • aou-1.0.16
  • aou-1.0.17
  • aou-1.0.18
  • aou-1.0.19
  • aou-1.0.2
  • aou-1.0.20
  • aou-1.0.21
  • aou-1.0.3
  • aou-1.0.4
  • aou-1.0.5
  • aou-1.0.6
  • aou-1.0.7
  • aou-1.0.8
  • aou-1.0.9
  • aou-1.1.0
  • aou-2.0.0
  • aou-2.0.0-RC1
  • aou-2.0.0-RC2
  • aou-2.0.0-RC3
  • aou-2.0.1
  • aou-2.0.10
  • aou-2.0.11
  • aou-2.0.12
  • aou-2.0.13
  • aou-2.0.14
  • aou-2.0.15
  • aou-2.0.16
  • aou-2.0.17
  • aou-2.0.18
  • aou-2.0.19
  • aou-2.0.2
  • aou-2.0.20
  • aou-2.0.21
  • aou-2.0.22
  • aou-2.0.23
  • aou-2.0.24
  • aou-2.0.25
  • aou-2.0.26
  • aou-2.0.27
  • aou-2.0.28
  • aou-2.0.29
  • aou-2.0.3
  • aou-2.0.30
  • aou-2.0.31
  • aou-2.0.32
  • aou-2.0.33
  • aou-2.0.34
  • aou-2.0.4
  • aou-2.0.5
  • aou-2.0.6
  • aou-2.0.7
  • aou-2.0.8
  • aou-2.0.9
  • aou-2.1.0
  • aou-2.1.1
  • aou-2.1.10
  • aou-2.1.11
  • aou-2.1.12
  • aou-2.1.13
  • aou-2.1.14
  • aou-2.1.15
  • aou-2.1.16
  • aou-2.1.17
  • aou-2.1.18
  • aou-2.1.19
  • aou-2.1.2
  • aou-2.1.20
  • aou-2.1.21
  • aou-2.1.22
  • aou-2.1.23
  • aou-2.1.24
  • aou-2.1.25
  • aou-2.1.26
  • aou-2.1.27
  • aou-2.1.28
  • aou-2.1.29
  • aou-2.1.3
  • aou-2.1.30
  • aou-2.1.31
  • aou-2.1.32
  • aou-2.1.33
  • aou-2.1.4
  • aou-2.1.5
  • aou-2.1.6
  • aou-2.1.7
  • aou-2.1.8
151 results

Target

Select target project
  • aou/aou-backend
1 result
Select Git revision
  • 0.0.3-maintenance
  • 1.0-maintenance
  • 2.0-maintenance
  • AOU-1412_Add_checksum_of_DataFile_when_importing_in_Fedora
  • HBO-test-jenkins-library
  • HCA-PortingSolidify-3.2
  • HCA-PortingSolidify-3.5
  • adf-1418-do-not-index-certain-files
  • adf-1464-job-clean-download-files
  • adf-1867-list-publications-stats
  • adf-763-1127-improve-license-mapping-during-imports
  • adf-907-notifications-mark-as-read
  • adf-956-add-imprimatur-and-mode-de-diffussion-for-thesis
  • adf-956-new-document-types-imprimatur-and-mode-de-diffusion
  • adf-979-add-depositor-in-notifications-email
  • adf-squash-commits-jb
  • adf-validator-name
  • aou-1512_fix_coherence_orders_for_indexed_structures
  • contributors-with-names
  • jbc-bibliography-tmpl
  • jbc-csl-correctionsDD
  • jbc-update-coverpage
  • master
  • remove-not-neccessary-ExtendWith-annotations
  • rod-refactor-fedora-storage-get-datastream-index
  • rodn-113-indexing-service
  • rodn-1136-author-can-send-in-validation
  • rodn-1253-fix-validator-comments-notifications
  • rodn-1634-bibliography-add-sort-by-validation-date
  • rodn-1829-scheduled-task-to-export-to-orcid
  • rodn-833-add-validation-rules-before-submit
  • rodn-access-contributor-by-orcid-old
  • rodn-finalize-swiss-library-exports-task
  • rodn-fix-IT
  • rodn-improve-access-it
  • rodn-index-contributors-without-director
  • rodn-index-fix-indexing-with-large-fulltext
  • rodn-index-subtype-code
  • rodn-language-refactoring
  • rodn-merge-users-it
  • rodn-orcid-export-master-with-other-id
  • rodn-orcid-solidify-webhooks
  • rodn-prevent-hibernate-circular-exception
  • rodn-refactor-labels
  • rodn-search-accent-insensitive
  • rodn-shared-reference-to-collection-debug
  • rodn-solidify-3.5
  • rodn-solidify-es-8
  • rodn-use-index-to-find-validable-publications
  • rodn-use-solidify-global-banner
  • unit-test-bibtex-escaper
  • aou-0.0.1
  • aou-0.0.2
  • aou-0.0.3
  • aou-0.0.3-patch1
  • aou-0.0.4
  • aou-0.0.5
  • aou-1.0.0
  • aou-1.0.1
  • aou-1.0.10
  • aou-1.0.11
  • aou-1.0.12
  • aou-1.0.13
  • aou-1.0.14
  • aou-1.0.15
  • aou-1.0.16
  • aou-1.0.17
  • aou-1.0.18
  • aou-1.0.19
  • aou-1.0.2
  • aou-1.0.20
  • aou-1.0.21
  • aou-1.0.3
  • aou-1.0.4
  • aou-1.0.5
  • aou-1.0.6
  • aou-1.0.7
  • aou-1.0.8
  • aou-1.0.9
  • aou-1.1.0
  • aou-2.0.0
  • aou-2.0.0-RC1
  • aou-2.0.0-RC2
  • aou-2.0.0-RC3
  • aou-2.0.1
  • aou-2.0.10
  • aou-2.0.11
  • aou-2.0.12
  • aou-2.0.13
  • aou-2.0.14
  • aou-2.0.15
  • aou-2.0.16
  • aou-2.0.17
  • aou-2.0.18
  • aou-2.0.19
  • aou-2.0.2
  • aou-2.0.20
  • aou-2.0.21
  • aou-2.0.22
  • aou-2.0.23
  • aou-2.0.24
  • aou-2.0.25
  • aou-2.0.26
  • aou-2.0.27
  • aou-2.0.28
  • aou-2.0.29
  • aou-2.0.3
  • aou-2.0.30
  • aou-2.0.31
  • aou-2.0.32
  • aou-2.0.33
  • aou-2.0.34
  • aou-2.0.4
  • aou-2.0.5
  • aou-2.0.6
  • aou-2.0.7
  • aou-2.0.8
  • aou-2.0.9
  • aou-2.1.0
  • aou-2.1.1
  • aou-2.1.10
  • aou-2.1.11
  • aou-2.1.12
  • aou-2.1.13
  • aou-2.1.14
  • aou-2.1.15
  • aou-2.1.16
  • aou-2.1.17
  • aou-2.1.18
  • aou-2.1.19
  • aou-2.1.2
  • aou-2.1.20
  • aou-2.1.21
  • aou-2.1.22
  • aou-2.1.23
  • aou-2.1.24
  • aou-2.1.25
  • aou-2.1.26
  • aou-2.1.27
  • aou-2.1.28
  • aou-2.1.29
  • aou-2.1.3
  • aou-2.1.30
  • aou-2.1.31
  • aou-2.1.32
  • aou-2.1.33
  • aou-2.1.4
  • aou-2.1.5
  • aou-2.1.6
  • aou-2.1.7
  • aou-2.1.8
151 results
Show changes
......@@ -31,10 +31,11 @@ import java.util.NoSuchElementException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.event.TransactionalEventListener;
import ch.unige.solidify.config.SolidifyEventPublisher;
import ch.unige.solidify.util.StringTool;
......@@ -101,8 +102,8 @@ public class NotificationService extends AouResourceService<Notification> {
*
* @param eventMessage
*/
@EventListener
@Transactional
@TransactionalEventListener(fallbackExecution = true)
@Transactional(propagation = Propagation.REQUIRES_NEW)
@Async
public void listenToNewEventCreation(EventMessage eventMessage) {
......
......@@ -109,8 +109,9 @@ public class PublicationCommentController extends CompositionController<Publicat
public HttpEntity<Comment> update(@PathVariable final String parentid, @PathVariable final String id,
@RequestBody final Map<String, Object> updateMap) {
String authenticatedPersonId = this.personService.getLinkedPersonId(SecurityContextHolder.getContext().getAuthentication());
Person person = this.subResourceService.findOne(id).getPerson();
if (authenticatedPersonId.equals(person.getResId())) {
Comment comment = this.subResourceService.findOne(id);
Person person = comment.getPerson();
if (!comment.isSystem() && authenticatedPersonId.equals(person.getResId())) {
return super.update(parentid, id, updateMap);
} else {
return new ResponseEntity<>(HttpStatus.FORBIDDEN);
......@@ -122,8 +123,9 @@ public class PublicationCommentController extends CompositionController<Publicat
@PreAuthorize("@publicationPermissionService.isAllowed(#parentid, 'DELETE_DEPOSIT_COMMENT')")
public ResponseEntity<Void> delete(@PathVariable final String parentid, @PathVariable final String id) {
String authenticatedPersonId = this.personService.getLinkedPersonId(SecurityContextHolder.getContext().getAuthentication());
Person person = this.subResourceService.findOne(id).getPerson();
if (authenticatedPersonId.equals(person.getResId()) || this.personService.authenticatedUserHasPriviledgedRole()) {
Comment comment = this.subResourceService.findOne(id);
Person person = comment.getPerson();
if (!comment.isSystem() && (authenticatedPersonId.equals(person.getResId()) || this.personService.authenticatedUserHasPriviledgedRole())) {
return super.delete(parentid, id);
} else {
return new ResponseEntity<>(HttpStatus.FORBIDDEN);
......