mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ACS-284: AuthenticationUtil.runAs method should leave the security context as it found it
This commit is contained in:
@@ -618,7 +618,13 @@ public class AuthenticationUtil implements InitializingBean
|
|||||||
{
|
{
|
||||||
if (originalFullAuthentication == null)
|
if (originalFullAuthentication == null)
|
||||||
{
|
{
|
||||||
AuthenticationUtil.clearCurrentSecurityContext();
|
if (logger.isTraceEnabled())
|
||||||
|
{
|
||||||
|
logger.trace("Removing the current security information for thread: " + Thread.currentThread().getName());
|
||||||
|
}
|
||||||
|
ContextHolder.setContext(null);
|
||||||
|
TenantContextHolder.clearTenantDomain();
|
||||||
|
|
||||||
logNDC(null);
|
logNDC(null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user