Fix for ALF-11973

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32884 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2011-12-20 14:01:20 +00:00
parent d163e918b8
commit 6b52bff5b2

View File

@@ -50,7 +50,7 @@ public class AlfrescoCmisServiceInterceptor implements MethodInterceptor
boolean debug = logger.isDebugEnabled(); boolean debug = logger.isDebugEnabled();
boolean trace = logger.isTraceEnabled(); boolean trace = logger.isTraceEnabled();
StringBuilder sb = null; StringBuilder sb = null;
if (debug) if (debug || trace)
{ {
sb = new StringBuilder("\n" + sb = new StringBuilder("\n" +
"CMIS invocation: \n" + "CMIS invocation: \n" +
@@ -68,26 +68,39 @@ public class AlfrescoCmisServiceInterceptor implements MethodInterceptor
{ {
// Wrap with pre- and post-method calls // Wrap with pre- and post-method calls
try try
{
if(debug || trace)
{ {
sb.append( sb.append(
" Pre-call authentication: \n" + " Pre-call authentication: \n" +
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" + " Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" +
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n"); " Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
}
service.beforeCall(); service.beforeCall();
if(debug || trace)
{
sb.append( sb.append(
" In-call authentication: \n" + " In-call authentication: \n" +
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" + " Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" +
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n"); " Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
}
ret = invocation.proceed(); ret = invocation.proceed();
} }
finally finally
{ {
service.afterCall(); service.afterCall();
if(debug || trace)
{
sb.append( sb.append(
" Post-call authentication: \n" + " Post-call authentication: \n" +
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" + " Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" +
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n"); " Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
} }
}
if (trace) if (trace)
{ {
sb.append( sb.append(