mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||||
{
|
{
|
||||||
"success": ${success?string},
|
"data": <@emailmapLib.emailmapJSON emailmap=emailmap />
|
||||||
<#if success>
|
|
||||||
"data": <@emailmapLib.emailmapJSON emailmap=emailmap />
|
|
||||||
<#else>
|
|
||||||
"message": "${message}"
|
|
||||||
</#if>
|
|
||||||
}
|
}
|
||||||
</#escape>
|
</#escape>
|
@@ -69,7 +69,6 @@ public class EmailMapPost extends DeclarativeWebScript
|
|||||||
|
|
||||||
// Add the lists of custom mappings to the model
|
// Add the lists of custom mappings to the model
|
||||||
model.put("emailmap", customEmailMappingService.getCustomMappings());
|
model.put("emailmap", customEmailMappingService.getCustomMappings());
|
||||||
model.put("success", true);
|
|
||||||
}
|
}
|
||||||
catch (IOException iox)
|
catch (IOException iox)
|
||||||
{
|
{
|
||||||
@@ -83,8 +82,8 @@ public class EmailMapPost extends DeclarativeWebScript
|
|||||||
}
|
}
|
||||||
catch (AlfrescoRuntimeException are)
|
catch (AlfrescoRuntimeException are)
|
||||||
{
|
{
|
||||||
model.put("message", are.getMessage());
|
throw new WebScriptException(Status.STATUS_INTERNAL_SERVER_ERROR,
|
||||||
model.put("success", false);
|
are.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
|
Reference in New Issue
Block a user