add error indicating no authorization for action.

This commit is contained in:
Keith Woodlock
2012-08-23 11:18:26 +01:00
parent 17ba21d302
commit bf4490feb9
@@ -71,7 +71,11 @@ public class ApiGlobalErrorResponse {
globalErrorResponse.setDeveloperMessage("The user associated with credentials passed on this request does not have sufficient privileges to perform this action.");
globalErrorResponse.setDeveloperDocLink("https://github.com/keithwoodlock/mifosx/wiki/HTTP-API-Error-codes");
globalErrorResponse.setUserMessageGlobalisationCode("error.msg.not.authorized");
globalErrorResponse.setDefaultUserMessage("Insufficient priviledges to perform this action.");
globalErrorResponse.setDefaultUserMessage("Insufficient privileges to perform this action.");
List<ApiParameterError> errors = new ArrayList<ApiParameterError>();
errors.add(ApiParameterError.generalError("error.msg.not.authorized", "Insufficient privileges to perform this action."));
globalErrorResponse.setErrors(errors);
return globalErrorResponse;
}