mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged DEV/SWIFT to HEAD
25629: ALF-7069: - changed getNodes to a POST request - beefed up unit tests + some performance tests ALF-7070: - initial checkin, works end-to-end, still work-in-progress - unit + performance tests 25630: ALF-7069: removed files that are no longer needed 25640: Merged BRANCHES\DEV\SOLR to BRANCHES\DEV\SWIFT 25079: SOLR check point: ALF-4259: SOLR Integration 25217: ALF-7068: SOLR 075 Improved cache rebuild performance - delta + query cache warming 25315: ALF-7068: SOLR 075 Improved cache rebuild performance - delta + query cache warming 25577: ALF-7068: SOLR 075 Improved cache rebuild performance - delta + query cache warming 25604: ALF-7068: SOLR 075 Improved cache rebuild performance - delta + query cache warming 25610: ALF-7068: SOLR 075 Improved cache rebuild performance - delta + query cache warming 25651: - enabled OpenCMIS server ticket authentication - added OpenCMIS client API (incomplete) 25667: Merged BRANCHES/DEV/BM to BRANCHES/DEV/SWIFT: 25030: Repo BM Sprint 1 - example using JMeter (WebDAV & CMIS) 25054: Repo BM Sprint 1 - milestone 2 25078: Repo BM sprint 1 - milestone 3 (ALF-6794) 25675: ALF-7068: SOLR 075 Improved cache rebuild performance - delta + query cache warming - fix queries against un-optimized index 25676: Merged BRANCHES/DEV/BM to BRANCHES/DEV/SWIFT: commit mergeinfo 25683: RepoBM: OpenCMIS - use shared libs (from 3rd-party project) - change default url (from ".../alfresco/opencmis-atom" to ".../alfresco/cmisatom") 25767: ALF-7339: SOLR 020 Index track and build from SOLR - Initial hook up point and proto type for config 25787: ALF-7070: - owner, associations, type conversions SOLR Client-side API to call into repository SOLR APIs 25818: added webscripts root object as an entry point to OpenCMIS client sessions (local and remote) 25855: Bug fix: keep CMIS connection manager reference git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28089 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -47,6 +47,8 @@ import org.alfresco.repo.content.encoding.ContentCharsetFinder;
|
||||
import org.alfresco.repo.node.integrity.IntegrityException;
|
||||
import org.alfresco.repo.search.QueryParameterDefImpl;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.Authorization;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.repo.version.VersionModel;
|
||||
@@ -145,23 +147,33 @@ public class AlfrescoCmisService extends AbstractCmisService
|
||||
{
|
||||
this.context = context;
|
||||
|
||||
// authenticate user
|
||||
String user = context.getUsername();
|
||||
String password = context.getPassword();
|
||||
|
||||
if ((user == null) || (user.length() == 0))
|
||||
{
|
||||
throw new CmisPermissionDeniedException("No user provided!");
|
||||
}
|
||||
|
||||
if (password == null)
|
||||
{
|
||||
password = "";
|
||||
}
|
||||
|
||||
AuthenticationUtil.pushAuthentication();
|
||||
|
||||
try
|
||||
{
|
||||
connector.getAuthenticationService().authenticate(user, password.toCharArray());
|
||||
String currentUser = connector.getAuthenticationService().getCurrentUserName();
|
||||
String user = context.getUsername();
|
||||
String password = context.getPassword();
|
||||
|
||||
if (currentUser == null)
|
||||
{
|
||||
Authorization auth = new Authorization(user, password);
|
||||
|
||||
if (auth.isTicket())
|
||||
{
|
||||
connector.getAuthenticationService().validate(auth.getTicket());
|
||||
} else
|
||||
{
|
||||
connector.getAuthenticationService().authenticate(auth.getUserName(), auth.getPasswordCharArray());
|
||||
}
|
||||
|
||||
} else if (currentUser.equals(connector.getProxyUser()))
|
||||
{
|
||||
if (user != null && user.length() > 0)
|
||||
{
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(user);
|
||||
}
|
||||
}
|
||||
} catch (AuthenticationException ae)
|
||||
{
|
||||
throw new CmisPermissionDeniedException(ae.getMessage(), ae);
|
||||
@@ -173,7 +185,7 @@ public class AlfrescoCmisService extends AbstractCmisService
|
||||
beginReadOnlyTransaction();
|
||||
} catch (Exception e)
|
||||
{
|
||||
connector.getAuthenticationService().clearCurrentSecurityContext();
|
||||
AuthenticationUtil.popAuthentication();
|
||||
|
||||
if (e instanceof CmisBaseException)
|
||||
{
|
||||
@@ -202,8 +214,7 @@ public class AlfrescoCmisService extends AbstractCmisService
|
||||
}
|
||||
} finally
|
||||
{
|
||||
// clean up
|
||||
connector.getAuthenticationService().clearCurrentSecurityContext();
|
||||
AuthenticationUtil.popAuthentication();
|
||||
context = null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user