mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Enable cold bootstrap without waking up authentication component. Made ImporterComponent use AuthenticationContext rather than AuthenticationService. Was then able to roll back temporary fix to AuthenticationFilter (from 13673).
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13727 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -320,6 +320,16 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
|
||||
return authenticationContext.isSystemUserName(userName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the current user the system user?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isCurrentUserTheSystemUser()
|
||||
{
|
||||
return authenticationContext.isCurrentUserTheSystemUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the Guest User note: for MT, will get guest for default domain only
|
||||
*
|
||||
|
@@ -24,6 +24,8 @@
|
||||
*/
|
||||
package org.alfresco.repo.security.authentication;
|
||||
|
||||
import org.alfresco.service.Auditable;
|
||||
|
||||
import net.sf.acegisecurity.Authentication;
|
||||
import net.sf.acegisecurity.UserDetails;
|
||||
|
||||
@@ -87,6 +89,11 @@ public interface AuthenticationContext
|
||||
* True if this is the System user ?
|
||||
*/
|
||||
public boolean isSystemUserName(String userName);
|
||||
|
||||
/**
|
||||
* Is the current user the system user?
|
||||
*/
|
||||
public boolean isCurrentUserTheSystemUser();
|
||||
|
||||
/**
|
||||
* Get the name of the Guest User. Note: for MT, will get guest for default domain only
|
||||
|
@@ -102,6 +102,11 @@ public class AuthenticationContextImpl implements AuthenticationContext
|
||||
return getSystemUserName().equals(this.tenantService.getBaseNameUser(userName));
|
||||
}
|
||||
|
||||
public boolean isCurrentUserTheSystemUser()
|
||||
{
|
||||
return isSystemUserName(getCurrentUserName());
|
||||
}
|
||||
|
||||
public String getGuestUserName(String tenantDomain)
|
||||
{
|
||||
return this.tenantService.getDomainUser(getGuestUserName(), tenantDomain);
|
||||
|
Reference in New Issue
Block a user