mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged V3.2 to HEAD:
16713: ETHREEOH-2379 deployment missing crypto libraries. 16722: ETHREEOH-2798 - java.lang.NullPointerException while deleting a folder node with emptyTranslation 16752: ETHREEOH-2946 - Release a test server from inside an Approve/Reject task 16796: ETHREEOH-1841 - MBean error when running in a WebSphere cluster 16920: ETHREEOH-2796 - Word 97 To Text transformation fails 16955: Merge V3.1 to V3.2 14275: Invitation change for ETHREEOH-1456, Missed change from check in 14222. 14222: ETHREEOH-1456 - accepting a rejected invitation. 16963: ETHREEOH-3029 - Strange defaltOnLoadListsner in hibernate-context.xml git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -134,6 +134,9 @@ public class InviteResponse extends DeclarativeWebScript
|
|||||||
String inviteId = req.getServiceMatch().getTemplateVars().get("inviteId");
|
String inviteId = req.getServiceMatch().getTemplateVars().get("inviteId");
|
||||||
String inviteTicket = req.getServiceMatch().getTemplateVars().get("inviteTicket");
|
String inviteTicket = req.getServiceMatch().getTemplateVars().get("inviteTicket");
|
||||||
|
|
||||||
|
// Check that the task is still open.
|
||||||
|
//if(inviteStart)
|
||||||
|
|
||||||
// process response
|
// process response
|
||||||
String action = req.getServiceMatch().getTemplateVars().get("action");
|
String action = req.getServiceMatch().getTemplateVars().get("action");
|
||||||
if (action.equals("accept"))
|
if (action.equals("accept"))
|
||||||
@@ -149,6 +152,10 @@ public class InviteResponse extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
throw new WebScriptException(Status.STATUS_FORBIDDEN, fe.toString());
|
throw new WebScriptException(Status.STATUS_FORBIDDEN, fe.toString());
|
||||||
}
|
}
|
||||||
|
catch (InvitationExceptionUserError fe)
|
||||||
|
{
|
||||||
|
throw new WebScriptException(Status.STATUS_CONFLICT, fe.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (action.equals("reject"))
|
else if (action.equals("reject"))
|
||||||
{
|
{
|
||||||
@@ -163,6 +170,10 @@ public class InviteResponse extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
throw new WebScriptException(Status.STATUS_FORBIDDEN, fe.toString());
|
throw new WebScriptException(Status.STATUS_FORBIDDEN, fe.toString());
|
||||||
}
|
}
|
||||||
|
catch (InvitationExceptionUserError fe)
|
||||||
|
{
|
||||||
|
throw new WebScriptException(Status.STATUS_CONFLICT, fe.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -583,6 +583,13 @@ public class InviteServiceTest extends BaseWebScriptTest
|
|||||||
String acceptInviteUrl = URL_INVITE + "/" + inviteId + "/" + inviteTicket + "/accept";
|
String acceptInviteUrl = URL_INVITE + "/" + inviteId + "/" + inviteTicket + "/accept";
|
||||||
sendRequest(new PutRequest(acceptInviteUrl, (byte[])null, null), Status.STATUS_OK);
|
sendRequest(new PutRequest(acceptInviteUrl, (byte[])null, null), Status.STATUS_OK);
|
||||||
|
|
||||||
|
// Invitee attempts to accept the invitation again
|
||||||
|
sendRequest(new PutRequest(acceptInviteUrl, (byte[])null, null), Status.STATUS_CONFLICT);
|
||||||
|
|
||||||
|
// Invitee attempts to reject an invitation that has already been accepted.
|
||||||
|
rejectInvite(inviteId, inviteTicket, Status.STATUS_CONFLICT);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// test that invitation represented by invite ID (of invitation started
|
// test that invitation represented by invite ID (of invitation started
|
||||||
// above)
|
// above)
|
||||||
@@ -611,6 +618,9 @@ public class InviteServiceTest extends BaseWebScriptTest
|
|||||||
|
|
||||||
rejectInvite(inviteId, inviteTicket, Status.STATUS_OK);
|
rejectInvite(inviteId, inviteTicket, Status.STATUS_OK);
|
||||||
|
|
||||||
|
// Negative test
|
||||||
|
rejectInvite(inviteId, inviteTicket, Status.STATUS_CONFLICT);
|
||||||
|
|
||||||
//
|
//
|
||||||
// test that invite represented by invite ID (of invitation started
|
// test that invite represented by invite ID (of invitation started
|
||||||
// above)
|
// above)
|
||||||
@@ -624,6 +634,8 @@ public class InviteServiceTest extends BaseWebScriptTest
|
|||||||
|
|
||||||
// there should no longer be any invites identified by invite ID pending
|
// there should no longer be any invites identified by invite ID pending
|
||||||
// assertEquals(0, getInvitesResult.getJSONArray("invites").length());
|
// assertEquals(0, getInvitesResult.getJSONArray("invites").length());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetInvitesByInviteId() throws Exception
|
public void testGetInvitesByInviteId() throws Exception
|
||||||
|
Reference in New Issue
Block a user