mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ALFCOM-1311 - message now shown on the Explorer login page when user does not have enough permissions to view an item.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14512 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,6 +40,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.content.filestore.FileContentReader;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.model.FileNotFoundException;
|
||||
@@ -56,6 +57,7 @@ import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.URLDecoder;
|
||||
import org.alfresco.util.URLEncoder;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.LoginBean;
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
/**
|
||||
@@ -229,6 +231,11 @@ public abstract class BaseDownloadContentServlet extends BaseServlet
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Redirecting to login page...");
|
||||
|
||||
// TODO: replace with serviceRegistry.getAuthorityService().hasGuestAuthority() from 3.1E
|
||||
if (!AuthenticationUtil.getFullyAuthenticatedUser().equals(AuthenticationUtil.getGuestUserName()))
|
||||
{
|
||||
req.getSession().setAttribute(LoginBean.LOGIN_NOPERMISSIONS, Boolean.TRUE);
|
||||
}
|
||||
redirectToLoginPage(req, res, getServletContext());
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user