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" +
@@ -69,24 +69,37 @@ public class AlfrescoCmisServiceInterceptor implements MethodInterceptor
// Wrap with pre- and post-method calls // Wrap with pre- and post-method calls
try try
{ {
sb.append( if(debug || trace)
" Pre-call authentication: \n" + {
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" + sb.append(
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n"); " Pre-call authentication: \n" +
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" +
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
}
service.beforeCall(); service.beforeCall();
sb.append(
" In-call authentication: \n" + if(debug || trace)
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" + {
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n"); sb.append(
" In-call authentication: \n" +
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" +
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
}
ret = invocation.proceed(); ret = invocation.proceed();
} }
finally finally
{ {
service.afterCall(); service.afterCall();
sb.append(
" Post-call authentication: \n" + if(debug || trace)
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" + {
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n"); sb.append(
" Post-call authentication: \n" +
" Full auth: " + AuthenticationUtil.getFullyAuthenticatedUser() + "\n" +
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
}
} }
if (trace) if (trace)
{ {