From a3c992113ecf848f2abf141a99a903b5d4f122d1 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Wed, 23 May 2007 06:57:07 +0000 Subject: [PATCH] SEC-459: Provide local argument to the message source accessor. --- .../BasicAclEntryAfterInvocationProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/acegisecurity/afterinvocation/BasicAclEntryAfterInvocationProvider.java b/core/src/main/java/org/acegisecurity/afterinvocation/BasicAclEntryAfterInvocationProvider.java index 7866736e0a..5d3136a2a7 100644 --- a/core/src/main/java/org/acegisecurity/afterinvocation/BasicAclEntryAfterInvocationProvider.java +++ b/core/src/main/java/org/acegisecurity/afterinvocation/BasicAclEntryAfterInvocationProvider.java @@ -33,6 +33,7 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.context.MessageSource; import org.springframework.context.MessageSourceAware; +import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.support.MessageSourceAccessor; import org.springframework.util.Assert; @@ -120,7 +121,7 @@ public class BasicAclEntryAfterInvocationProvider implements AfterInvocationProv throw new AccessDeniedException(messages.getMessage( "BasicAclEntryAfterInvocationProvider.noPermission", new Object[] {authentication.getName(), returnedObject}, - "Authentication {0} has NO permissions at all to the domain object {1}")); + "Authentication {0} has NO permissions at all to the domain object {1}", LocaleContextHolder.getLocale())); } for (int i = 0; i < acls.length; i++) { @@ -147,7 +148,7 @@ public class BasicAclEntryAfterInvocationProvider implements AfterInvocationProv "BasicAclEntryAfterInvocationProvider.insufficientPermission", new Object[] {authentication.getName(), returnedObject}, "Authentication {0} has ACL permissions to the domain object, " - + "but not the required ACL permission to the domain object {1}")); + + "but not the required ACL permission to the domain object {1}", LocaleContextHolder.getLocale())); } }