RM-603 (REST API: users without Map Email Metadata capability can GET, POST, DELETE e-mail mappings)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@55076 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2013-09-07 21:17:41 +00:00
parent 1098fda2bb
commit 018bd7f557
2 changed files with 6 additions and 12 deletions

View File

@@ -2,11 +2,6 @@
<#escape x as jsonUtils.encodeJSONString(x)>
{
"success": ${success?string},
<#if success>
"data": <@emailmapLib.emailmapJSON emailmap=emailmap />
<#else>
"message": "${message}"
</#if>
}
</#escape>

View File

@@ -69,7 +69,6 @@ public class EmailMapPost extends DeclarativeWebScript
// Add the lists of custom mappings to the model
model.put("emailmap", customEmailMappingService.getCustomMappings());
model.put("success", true);
}
catch (IOException iox)
{
@@ -83,8 +82,8 @@ public class EmailMapPost extends DeclarativeWebScript
}
catch (AlfrescoRuntimeException are)
{
model.put("message", are.getMessage());
model.put("success", false);
throw new WebScriptException(Status.STATUS_INTERNAL_SERVER_ERROR,
are.getMessage());
}
return model;