aclJson = mapper.readTree(aclJsonString);
}catch(JsonProcessingException e){
return status(CustomHttpCode.ACL_JSON_FIELD_MALFORMED.getBbCode(),"The 'acl' field is malformed");
}
/*check if the roles and users are valid*/
Iterator<Entry<String, JsonNode>> it = aclJson.fields();
while (it.hasNext()){
//check for permission read/update/delete/all
Entry<String, JsonNode> next = it.next();
if (!PermissionsHelper.permissionsFromString.containsKey(next.getKey())){
return status(CustomHttpCode.ACL_PERMISSION_UNKNOWN.getBbCode(),"The key '"+next.getKey()+"' is invalid. Valid ones are 'read','update','delete','all'");