mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 14:33:09 +00:00
Entities features: update the item metadata on relationship create/delete also when not using REST
on update this is causing problems with the place changes
This commit is contained in:
@@ -90,6 +90,7 @@ public class RelationshipServiceImpl implements RelationshipService {
|
|||||||
Relationship relationshipToReturn = relationshipDAO.create(context, relationship);
|
Relationship relationshipToReturn = relationshipDAO.create(context, relationship);
|
||||||
updatePlaceInRelationship(context, relationshipToReturn);
|
updatePlaceInRelationship(context, relationshipToReturn);
|
||||||
update(context, relationshipToReturn);
|
update(context, relationshipToReturn);
|
||||||
|
updateItemsInRelationship(context, relationship);
|
||||||
return relationshipToReturn;
|
return relationshipToReturn;
|
||||||
} else {
|
} else {
|
||||||
throw new AuthorizeException(
|
throw new AuthorizeException(
|
||||||
@@ -307,7 +308,6 @@ public class RelationshipServiceImpl implements RelationshipService {
|
|||||||
authorizeService.authorizeActionBoolean(context, relationship.getRightItem(), Constants.WRITE)) {
|
authorizeService.authorizeActionBoolean(context, relationship.getRightItem(), Constants.WRITE)) {
|
||||||
if (isRelationshipValidToCreate(context, relationship)) {
|
if (isRelationshipValidToCreate(context, relationship)) {
|
||||||
relationshipDAO.save(context, relationship);
|
relationshipDAO.save(context, relationship);
|
||||||
updateItemsInRelationship(context, relationship);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new AuthorizeException("You do not have write rights on this relationship's items");
|
throw new AuthorizeException("You do not have write rights on this relationship's items");
|
||||||
|
Reference in New Issue
Block a user