mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added 'nodeArchiveService' bean
- Added tests around transaction visibility - TODO: Need to set the owner of archived and restored nodes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2786 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -109,6 +109,11 @@ public class AuthenticationServiceImpl implements AuthenticationService
|
||||
throw ae;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean authenticationExists(String userName)
|
||||
{
|
||||
return authenticationDao.userExists(userName);
|
||||
}
|
||||
|
||||
public String getCurrentUserName() throws AuthenticationException
|
||||
{
|
||||
|
@@ -180,7 +180,19 @@ public class ChainingAuthenticationServiceImpl implements AuthenticationService
|
||||
}
|
||||
}
|
||||
throw new AuthenticationException("Guest authentication not supported");
|
||||
}
|
||||
|
||||
public boolean authenticationExists(String userName)
|
||||
{
|
||||
for (AuthenticationService authService : getUsableAuthenticationServices())
|
||||
{
|
||||
if (authService.authenticationExists(userName))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// it doesn't exist in any of the authentication components
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getCurrentUserName() throws AuthenticationException
|
||||
|
@@ -230,6 +230,11 @@ public class TestAuthenticationServiceImpl implements AuthenticationService
|
||||
}
|
||||
}
|
||||
|
||||
public boolean authenticationExists(String userName)
|
||||
{
|
||||
return userNamesAndPasswords.containsKey(userName);
|
||||
}
|
||||
|
||||
public String getCurrentUserName() throws AuthenticationException
|
||||
{
|
||||
Context context = ContextHolder.getContext();
|
||||
|
Reference in New Issue
Block a user