mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.0/Cloud)
85566: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 85474: Merged DEV (4.2.4) to V4.2-BUG-FIX (4.2.4) 84715: MNT-12398 : FeedNotifier - Users mixed up, fail to send notification email Added a test to simulated the issue. Changed the FeedNotifier to use the runAsUser as it is set to run as system. 85443: MNT-12398 : FeedNotifier - Users mixed up, fail to send notification email Set the full security context in FeedNotifier and clear it after execution. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94503 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -331,7 +331,7 @@ public class FeedNotifierImpl implements FeedNotifier, ApplicationContextAware
|
||||
|
||||
try
|
||||
{
|
||||
final String currentUser = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
final String currentUser = AuthenticationUtil.getRunAsUser();
|
||||
final String tenantDomain = TenantUtil.getCurrentDomain();
|
||||
|
||||
// process the feeds using the batch processor {@link BatchProcessor}
|
||||
@@ -346,11 +346,12 @@ public class FeedNotifierImpl implements FeedNotifier, ApplicationContextAware
|
||||
|
||||
public void beforeProcess() throws Throwable
|
||||
{
|
||||
AuthenticationUtil.setRunAsUser(currentUser);
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(currentUser);
|
||||
}
|
||||
|
||||
public void afterProcess() throws Throwable
|
||||
{
|
||||
AuthenticationUtil.clearCurrentSecurityContext();
|
||||
}
|
||||
|
||||
public void process(final PersonInfo person) throws Throwable
|
||||
|
Reference in New Issue
Block a user