mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
. Guest access check-point
. Fixes to document/space details screen when expanding/collapsing the Links panel . Fix to Saved Searches to handle AuthenticationException for Guest user access to saved searches folder . Fix to New User and Edit Password dialogs to fire text changed events when paste is used to fill in form fields git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2164 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1302,7 +1302,7 @@ public class AdvancedSearchBean
|
||||
{
|
||||
userSearchesRef = results.get(0);
|
||||
}
|
||||
else if (results.size() == 0)
|
||||
else if (results.size() == 0 && new Node(globalRef).hasPermission(PermissionService.ADD_CHILDREN))
|
||||
{
|
||||
// attempt to create folder for this user for first time
|
||||
// create the preferences Node for this user
|
||||
|
@@ -278,12 +278,17 @@ public class LoginBean
|
||||
|
||||
if (this.username != null && this.password != null)
|
||||
{
|
||||
// Authenticate via the authentication service, then save the details of user in an object
|
||||
// in the session - this is used by the servlet filter etc. on each page to check for login
|
||||
try
|
||||
{
|
||||
Map session = fc.getExternalContext().getSessionMap();
|
||||
|
||||
// Authenticate via the authentication service, then save the details of user in an object
|
||||
// in the session - this is used by the servlet filter etc. on each page to check for login
|
||||
this.authenticationService.authenticate(this.username, this.password.toCharArray());
|
||||
|
||||
// remove the session invalidated flag (used to remove last username cookie by AuthenticationFilter)
|
||||
session.remove(AuthenticationHelper.SESSION_INVALIDATED);
|
||||
|
||||
// setup User object and Home space ID
|
||||
User user = new User(this.authenticationService.getCurrentUserName(), this.authenticationService.getCurrentTicket(),
|
||||
personService.getPerson(this.username));
|
||||
@@ -298,7 +303,6 @@ public class LoginBean
|
||||
|
||||
// put the User object in the Session - the authentication servlet will then allow
|
||||
// the app to continue without redirecting to the login page
|
||||
Map session = fc.getExternalContext().getSessionMap();
|
||||
session.put(AuthenticationHelper.AUTHENTICATION_USER, user);
|
||||
|
||||
// if an external outcome has been provided then use that, else use default
|
||||
|
@@ -39,6 +39,7 @@ import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.repository.TemplateImageResolver;
|
||||
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;
|
||||
@@ -406,6 +407,14 @@ public class NavigationBean
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if we are currently the special Guest user
|
||||
*/
|
||||
public boolean getIsGuest()
|
||||
{
|
||||
return Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserName().equals(PermissionService.GUEST);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the dispatch context so that the navigation handler knows
|
||||
* what object is being acted upon
|
||||
|
Reference in New Issue
Block a user