mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 22:13:08 +00:00
w2p-80200 Add new tests for each dspace object, cleaned up java docs and authrorization inside of create
This commit is contained in:
@@ -176,6 +176,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
||||
|
||||
@Override
|
||||
public Item create(Context context, WorkspaceItem workspaceItem) throws SQLException, AuthorizeException {
|
||||
authorizeService.authorizeAction(context, workspaceItem.getCollection(), Constants.ADD);
|
||||
if (workspaceItem.getItem() != null) {
|
||||
throw new IllegalArgumentException(
|
||||
"Attempting to create an item for a workspace item that already contains an item");
|
||||
@@ -193,6 +194,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
||||
@Override
|
||||
public Item create(Context context, WorkspaceItem workspaceItem,
|
||||
UUID uuid) throws SQLException, AuthorizeException {
|
||||
authorizeService.authorizeAction(context, workspaceItem.getCollection(), Constants.ADD);
|
||||
if (workspaceItem.getItem() != null) {
|
||||
throw new IllegalArgumentException(
|
||||
"Attempting to create an item for a workspace item that already contains an item");
|
||||
|
Reference in New Issue
Block a user