mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Tidy up of UserTransaction roll back on throwable as opposed to Exception
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2218 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -135,22 +135,34 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao
|
||||
sp.addStore(getUserStoreRef());
|
||||
sp.excludeDataInTheCurrentTransaction(false);
|
||||
|
||||
ResultSet rs = searchService.query(sp);
|
||||
ResultSet rs = null;
|
||||
|
||||
for (ResultSetRow row : rs)
|
||||
try
|
||||
{
|
||||
rs = searchService.query(sp);
|
||||
|
||||
NodeRef nodeRef = row.getNodeRef();
|
||||
if (nodeService.exists(nodeRef))
|
||||
for (ResultSetRow row : rs)
|
||||
{
|
||||
String realUserName = DefaultTypeConverter.INSTANCE.convert(String.class, nodeService.getProperty(
|
||||
nodeRef, ContentModel.PROP_USER_USERNAME));
|
||||
if (realUserName.equals(userName))
|
||||
|
||||
NodeRef nodeRef = row.getNodeRef();
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
return nodeRef;
|
||||
String realUserName = DefaultTypeConverter.INSTANCE.convert(String.class, nodeService.getProperty(
|
||||
nodeRef, ContentModel.PROP_USER_USERNAME));
|
||||
if (realUserName.equals(userName))
|
||||
{
|
||||
return nodeRef;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (rs != null)
|
||||
{
|
||||
rs.close();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user