mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
100858: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 100769: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 100158: Merged DEV (4.2.5) to V4.2-BUG-FIX (4.2.5) 100074: MNT-13579: IMAP: Sync doesn't work anymore after a Site which is already marked as IMAP favorite got deleted in Share. - Added a check to handle non-existent sites. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@100928 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -69,6 +69,7 @@ import org.alfresco.repo.policy.PolicyComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.site.SiteDoesNotExistException;
|
||||
import org.alfresco.repo.site.SiteModel;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
@@ -1435,8 +1436,18 @@ public class ImapServiceImpl implements ImapService, OnRestoreNodePolicy, OnCrea
|
||||
if (isImapFavourite != null && isImapFavourite)
|
||||
{
|
||||
String siteName = key.substring(AlfrescoImapConst.PREF_IMAP_FAVOURITE_SITES.length() + 1); // count the dot
|
||||
boolean siteExists = serviceRegistry.getSiteService().getSite(siteName) != null;
|
||||
if (siteExists && serviceRegistry.getSiteService().isMember(siteName, userName))
|
||||
boolean isMember = false;
|
||||
try
|
||||
{
|
||||
isMember = serviceRegistry.getSiteService().isMember(siteName, userName);
|
||||
}
|
||||
catch (SiteDoesNotExistException sdne)
|
||||
{
|
||||
// Ignore, see MNT-13579
|
||||
// The site might be archived. In this case it will still be in user's preferences.
|
||||
}
|
||||
|
||||
if (isMember)
|
||||
{
|
||||
SiteInfo siteInfo = serviceRegistry.getSiteService().getSite(siteName);
|
||||
if (siteInfo != null)
|
||||
|
Reference in New Issue
Block a user