Merged V3.0 to HEAD

11410: Activity Service - iBatis mapping files for MS SQL Server (using AlfrescoSQLServerDialect)
          Can be Enterprised when dual build is set up
   11414: Fix for missing servlet reference in repo web.xml
   11415: Activity Service - iBatis mapping files for new Oracle dialects (using AlfrescoOracle10gDialect or AlfrescoOracle9iDialect)
          Can be Entperprised when dual build is up
   11424: Remove conflicting java mail libraries.
          NOTE: Might affect 'CMIS web service implementation'
   11426: Activity Service - use lower-case columns
   11428: ETHREEOH-300: Site contributor can not delete his own blog posts
   11431: Removed tutorial from Guest home
   11432: ETHREEOH-198: SiteService is not MT enabled
   11440: Close all ScrollableResults in try{} finally{}
   11442: Fix for ETHREEOH-268, ETHREEOH-269, ETHREEOH-431, ETHREEOH-438, ETHREEOH-456, ETHREEOH-468, ETHREEOH-532
   11443: Update to JSF client Help URL
   11444: Build fix
   11447: MT - fix ETHREEOH-530
   11448: Fix for ETHREEOH-424: Edit Web Content: dojo.data.fromrfc3339 is not a function
   11449: Fix for ETHREEOH-218: DM forms should be disabled


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12427 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-12-17 06:49:28 +00:00
parent fc7a11387e
commit f74699749b
35 changed files with 1301 additions and 646 deletions

View File

@@ -89,9 +89,6 @@ public class SiteServiceImpl implements SiteService, SiteModel
private TaggingService taggingService;
private AuthorityService authorityService;
/** The site root node reference */
private NodeRef siteRootNodeRef;
/**
* Set node service
*
@@ -351,26 +348,21 @@ public class SiteServiceImpl implements SiteService, SiteModel
* @return NodeRef node reference
*/
private NodeRef getSiteRoot()
{
if (this.siteRootNodeRef == null)
{
// Get the root 'sites' folder
ResultSet resultSet = this.searchService.query(SITE_STORE, SearchService.LANGUAGE_LUCENE, "TYPE:\"st:sites\"");
if (resultSet.length() == 0)
{
// Get the root 'sites' folder
ResultSet resultSet = this.searchService.query(SITE_STORE, SearchService.LANGUAGE_LUCENE, "TYPE:\"st:sites\"");
if (resultSet.length() == 0)
{
// No root site folder exists
throw new AlfrescoRuntimeException("No root sites folder exists");
}
else if (resultSet.length() != 1)
{
// More than one root site folder exits
throw new AlfrescoRuntimeException("More than one root sites folder exists");
}
this.siteRootNodeRef = resultSet.getNodeRef(0);
// No root site folder exists
throw new AlfrescoRuntimeException("No root sites folder exists");
}
return this.siteRootNodeRef;
else if (resultSet.length() != 1)
{
// More than one root site folder exits
throw new AlfrescoRuntimeException("More than one root sites folder exists");
}
return resultSet.getNodeRef(0);
}
/**
@@ -664,7 +656,6 @@ public class SiteServiceImpl implements SiteService, SiteModel
// Get the current user
String currentUserName = AuthenticationUtil.getCurrentUserName();
String currentUserRole = getMembersRole(shortName, currentUserName);
// Get the user current role
final String role = getMembersRole(shortName, userName);
@@ -763,7 +754,6 @@ public class SiteServiceImpl implements SiteService, SiteModel
// -- the member does not already have permissions
// ... then we can set the permissions as system user
final String currentUserName = AuthenticationUtil.getCurrentUserName();
final String currentUserRole = getMembersRole(shortName, currentUserName);
if ((permissionService.hasPermission(siteNodeRef, PermissionService.CHANGE_PERMISSIONS) == AccessStatus.ALLOWED)
||
(isPublic == true &&