mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Fixes after master merge
This commit is contained in:
@@ -119,7 +119,8 @@ public class RelationshipRestRepository extends DSpaceRestRepository<Relationshi
|
||||
if (authorizeService.authorizeActionBoolean(context, leftItem, Constants.WRITE) ||
|
||||
authorizeService.authorizeActionBoolean(context, rightItem, Constants.WRITE)) {
|
||||
Relationship relationship = relationshipService.create(context, leftItem, rightItem,
|
||||
relationshipType, -1, -1, leftwardValue, rightwardValue);
|
||||
relationshipType, -1, -1,
|
||||
leftwardValue, rightwardValue);
|
||||
// The above if check deals with the case that a Relationship can be created if the user has write
|
||||
// rights on one of the two items. The following updateItem calls can however call the
|
||||
// ItemService.update() functions which would fail if the user doesn't have permission on both items.
|
||||
|
@@ -115,6 +115,8 @@ public class RelationshipRestRepositoryIT extends AbstractEntityIntegrationTest
|
||||
.withTitle("Author1")
|
||||
.withIssueDate("2017-10-17")
|
||||
.withAuthor("Smith, Donald")
|
||||
.withPersonIdentifierLastName("Smith")
|
||||
.withPersonIdentifierFirstName("Donald")
|
||||
.withRelationshipType("Person")
|
||||
.build();
|
||||
|
||||
@@ -934,6 +936,12 @@ public class RelationshipRestRepositoryIT extends AbstractEntityIntegrationTest
|
||||
|
||||
context.turnOffAuthorisationSystem();
|
||||
|
||||
Item publication1 = ItemBuilder.createItem(context, col3)
|
||||
.withTitle("Publication1")
|
||||
.withIssueDate("2015-01-01")
|
||||
.withRelationshipType("Publication")
|
||||
.build();
|
||||
|
||||
Item author2 = ItemBuilder.createItem(context, col2)
|
||||
.withTitle("Author2")
|
||||
.withIssueDate("2016-02-13")
|
||||
@@ -1144,6 +1152,12 @@ public class RelationshipRestRepositoryIT extends AbstractEntityIntegrationTest
|
||||
|
||||
context.turnOffAuthorisationSystem();
|
||||
|
||||
Item publication1 = ItemBuilder.createItem(context, col3)
|
||||
.withTitle("Publication1")
|
||||
.withIssueDate("2015-01-01")
|
||||
.withRelationshipType("Publication")
|
||||
.build();
|
||||
|
||||
Item author2 = ItemBuilder.createItem(context, col2)
|
||||
.withTitle("Author2")
|
||||
.withIssueDate("2016-02-13")
|
||||
|
Reference in New Issue
Block a user