mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
AW-542 Guest user can not see any Categories
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2456 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -188,8 +188,8 @@ mimetype=Format
|
||||
# Repo permission display labels
|
||||
# Note - these come from the server, the english translation is generally the same
|
||||
Administrator=Administrator
|
||||
Guest=Guest
|
||||
Read=Guest
|
||||
Consumer=Consumer
|
||||
Read=Consumer
|
||||
Coordinator=Coordinator
|
||||
Collaborator=Collaborator
|
||||
Contributor=Contributor
|
||||
|
@@ -37,9 +37,9 @@
|
||||
|
||||
<!-- The default permissions to apply to a new users Home Space when first created -->
|
||||
<!-- this permission is for other users attempting to access that Home Space -->
|
||||
<!-- generally set to "Guest" or empty value to indicate a private hidden space. -->
|
||||
<!-- generally set to "Consumer" or empty value to indicate a private hidden space. -->
|
||||
<!-- see org.alfresco.service.cmr.security.PermissionService for allowed values -->
|
||||
<home-space-permission>Guest</home-space-permission>
|
||||
<home-space-permission>Consumer</home-space-permission>
|
||||
|
||||
<!-- the URL to the client Help file -->
|
||||
<help-url>http://www.alfresco.org/help/webclient</help-url>
|
||||
|
@@ -40,7 +40,6 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -173,12 +172,6 @@ public class ContextListener implements ServletContextListener, HttpSessionListe
|
||||
|
||||
personService.createPerson(props);
|
||||
}
|
||||
// set the store's GUEST access if we are allowed to modify permissions
|
||||
if (!transactionService.isReadOnly())
|
||||
{
|
||||
PermissionService permissionService = (PermissionService) ctx.getBean("permissionService");
|
||||
permissionService.setPermission(rootNodeRef, permissionService.getAllAuthorities(), PermissionService.GUEST, true);
|
||||
}
|
||||
|
||||
// commit the transaction
|
||||
tx.commit();
|
||||
|
@@ -37,7 +37,7 @@ public class AlfrescoDefaultViewSelector implements DefaultViewSelector
|
||||
public String selectViewId(RenderRequest request, RenderResponse response) throws PortletException
|
||||
{
|
||||
User user = (User)request.getPortletSession().getAttribute(AuthenticationHelper.AUTHENTICATION_USER);
|
||||
if (user != null && user.getUserName().equals(PermissionService.GUEST))
|
||||
if (user != null && user.getUserName().equals(PermissionService.GUEST_AUTHORITY))
|
||||
{
|
||||
return "/jsp/browse/browse.jsp";
|
||||
}
|
||||
|
@@ -138,8 +138,8 @@ public final class AuthenticationHelper
|
||||
|
||||
NodeService nodeService = services.getNodeService();
|
||||
PersonService personService = (PersonService)wc.getBean(PERSON_SERVICE);
|
||||
NodeRef guestRef = personService.getPerson(PermissionService.GUEST);
|
||||
user = new User(PermissionService.GUEST, auth.getCurrentTicket(), guestRef);
|
||||
NodeRef guestRef = personService.getPerson(PermissionService.GUEST_AUTHORITY);
|
||||
user = new User(PermissionService.GUEST_AUTHORITY, auth.getCurrentTicket(), guestRef);
|
||||
NodeRef guestHomeRef = (NodeRef)nodeService.getProperty(guestRef, ContentModel.PROP_HOMEFOLDER);
|
||||
|
||||
// check that the home space node exists - else Guest cannot proceed
|
||||
@@ -266,8 +266,8 @@ public final class AuthenticationHelper
|
||||
|
||||
NodeService nodeService = services.getNodeService();
|
||||
PersonService personService = (PersonService)ctx.getBean(PERSON_SERVICE);
|
||||
NodeRef guestRef = personService.getPerson(PermissionService.GUEST);
|
||||
User user = new User(PermissionService.GUEST, auth.getCurrentTicket(), guestRef);
|
||||
NodeRef guestRef = personService.getPerson(PermissionService.GUEST_AUTHORITY);
|
||||
User user = new User(PermissionService.GUEST_AUTHORITY, auth.getCurrentTicket(), guestRef);
|
||||
NodeRef guestHomeRef = (NodeRef)nodeService.getProperty(guestRef, ContentModel.PROP_HOMEFOLDER);
|
||||
|
||||
// check that the home space node exists - else Guest cannot proceed
|
||||
|
@@ -25,7 +25,6 @@ import java.util.Map;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.event.ActionEvent;
|
||||
|
||||
import org.alfresco.config.ConfigService;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.filesys.CIFSServer;
|
||||
import org.alfresco.filesys.server.filesys.DiskSharedDevice;
|
||||
@@ -42,7 +41,6 @@ import org.alfresco.service.cmr.repository.TemplateNode;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
@@ -427,7 +425,7 @@ public class NavigationBean
|
||||
*/
|
||||
public boolean getIsGuest()
|
||||
{
|
||||
return Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserName().equals(PermissionService.GUEST);
|
||||
return Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserName().equals(PermissionService.GUEST_AUTHORITY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
<!-- The default permissions to apply to a new users Home Space when first created -->
|
||||
<!-- this permission is for other users attempting to access that Home Space -->
|
||||
<!-- generally set to "Guest" or empty value to indicate a private hidden space. -->
|
||||
<!-- generally set to "Consumer" or empty value to indicate a private hidden space. -->
|
||||
<!-- see org.alfresco.service.cmr.security.PermissionService for allowed values -->
|
||||
<home-space-permission>Editor</home-space-permission>
|
||||
|
||||
|
@@ -33,9 +33,9 @@
|
||||
|
||||
<!-- The default permissions to apply to a new users Home Space when first created -->
|
||||
<!-- this permission is for other users attempting to access that Home Space -->
|
||||
<!-- generally set to "Guest" or empty value to indicate a private hidden space. -->
|
||||
<!-- generally set to "Consumer" or empty value to indicate a private hidden space. -->
|
||||
<!-- see org.alfresco.service.cmr.security.PermissionService for allowed values -->
|
||||
<home-space-permission>Guest</home-space-permission>
|
||||
<home-space-permission>Consumer</home-space-permission>
|
||||
|
||||
<!-- the URL to the client Help file -->
|
||||
<help-url>http://www.alfresco.org/help/webclient</help-url>
|
||||
|
Reference in New Issue
Block a user