mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Added missing context.restoreAuthSystemState
This commit is contained in:
@@ -442,6 +442,8 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
|
||||
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
String token = getAuthToken(admin.getEmail(), password);
|
||||
|
||||
MvcResult mvcResult = getClient(token).perform(post("/api/core/relationships")
|
||||
@@ -536,6 +538,8 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
authorizeService.addPolicy(context, author1, Constants.WRITE, user);
|
||||
authorizeService.addPolicy(context, author2, Constants.WRITE, user);
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
String token = getAuthToken(user.getEmail(), password);
|
||||
|
||||
MvcResult mvcResult = getClient(token).perform(post("/api/core/relationships")
|
||||
@@ -629,6 +633,8 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
|
||||
authorizeService.addPolicy(context, publication, Constants.WRITE, user);
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
String token = getAuthToken(user.getEmail(), password);
|
||||
|
||||
MvcResult mvcResult = getClient(token).perform(post("/api/core/relationships")
|
||||
@@ -730,6 +736,8 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
authorizeService.addPolicy(context, publication1, Constants.WRITE, user);
|
||||
authorizeService.addPolicy(context, publication2, Constants.WRITE, user);
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
String token = getAuthToken(user.getEmail(), password);
|
||||
|
||||
MvcResult mvcResult = getClient(token).perform(post("/api/core/relationships")
|
||||
@@ -831,6 +839,8 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
|
||||
authorizeService.addPolicy(context, author1, Constants.WRITE, user);
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
String token = getAuthToken(user.getEmail(), password);
|
||||
|
||||
MvcResult mvcResult = getClient(getAuthToken(admin.getEmail(), password))
|
||||
@@ -924,6 +934,7 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
ePersonService.update(context, user);
|
||||
context.setCurrentUser(user);
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
String token = getAuthToken(admin.getEmail(), password);
|
||||
|
||||
@@ -1015,6 +1026,8 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
|
||||
authorizeService.addPolicy(context, author1, Constants.WRITE, user);
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
String token = getAuthToken(admin.getEmail(), password);
|
||||
|
||||
MvcResult mvcResult = getClient(token).perform(post("/api/core/relationships")
|
||||
@@ -1113,6 +1126,8 @@ public class RelationshipRestRepositoryIT extends AbstractControllerIntegrationT
|
||||
|
||||
String token = getAuthToken(user.getEmail(), password);
|
||||
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
MvcResult mvcResult = getClient(token).perform(post("/api/core/relationships")
|
||||
.param("relationshipType",
|
||||
isAuthorOfPublicationRelationshipType.getID()
|
||||
|
Reference in New Issue
Block a user