SEC-459: Provide local argument to the message source accessor.
This commit is contained in:
parent
a18bd9100c
commit
a3c992113e
|
@ -33,6 +33,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||||
|
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
import org.springframework.context.MessageSourceAware;
|
import org.springframework.context.MessageSourceAware;
|
||||||
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
import org.springframework.context.support.MessageSourceAccessor;
|
import org.springframework.context.support.MessageSourceAccessor;
|
||||||
|
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
@ -120,7 +121,7 @@ public class BasicAclEntryAfterInvocationProvider implements AfterInvocationProv
|
||||||
throw new AccessDeniedException(messages.getMessage(
|
throw new AccessDeniedException(messages.getMessage(
|
||||||
"BasicAclEntryAfterInvocationProvider.noPermission",
|
"BasicAclEntryAfterInvocationProvider.noPermission",
|
||||||
new Object[] {authentication.getName(), returnedObject},
|
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++) {
|
for (int i = 0; i < acls.length; i++) {
|
||||||
|
@ -147,7 +148,7 @@ public class BasicAclEntryAfterInvocationProvider implements AfterInvocationProv
|
||||||
"BasicAclEntryAfterInvocationProvider.insufficientPermission",
|
"BasicAclEntryAfterInvocationProvider.insufficientPermission",
|
||||||
new Object[] {authentication.getName(), returnedObject},
|
new Object[] {authentication.getName(), returnedObject},
|
||||||
"Authentication {0} has ACL permissions to the domain object, "
|
"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()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue