Merged V3.4-BUG-FIX to HEAD

29716: ALF-4029: FileContentStore does not remove empty folders when deleting URLs   
      delete() now crawls back up the dir hierarchy deleting directories until a non-empty parent is found.
   29767: ALF-9351 No exception with invalid permission definitions
      - DTD/Schema validation added
      - Corrected permissionDefinitions.xml (contained extra -->) so failed validation
   29797: ALF-9916 Audit user actions for site (added st:site to list of types in filter)
   29800: ALF-5499 IndexOutOfBoundsException in QuickSort
      Need to synchronize access to JSF session beans. Added a filter that will use the HttpSession
      (if it exists) as the monitor for a synchronized block so that only one request per session is
      processed at any time. Approach taken in preference to adding synchronized blocks/methods or
      locks to over 200 session beans in the Alfresco Explorer UI.
   29801: ALF-9190: If a user is invited to a site but joins the site independently, they end up with the "Consumer" role, regardless of the role they were invited with
   29805: ALF-4029: added utility to make some rough timings.
   
   29819: Merged DEV/TEMPORARY to V3.4-BUG-FIX (reviewed by Erik)
      29815: ALF-8414 : Remove button does not show on Flash upload in Share
         Changed flash-upload.css styles to correct upload dialog display in IE6/IE7. Changes were tested in all supported browsers.
   29826: Fix for ALF-9930
   29836: Merged V3.4-TEAM to V3.4-BUG-FIX
      27772: Incorrect behavior of enabling Google docs (Really: Forms get submitted twice in certain circumstances)
   29839: ALF-9351 No exception with invalid permission definitions
      - Added permissionsDefinitions.xml to RM's permissionsModelDAO spring bean def (root cause of build errors)
      - Use UTF-8 encoding rather than server default when writing out modified form of model xml
      - Use byte[] rather than a temp file (model files should be small)
      - Added and then commented out an approach that did not require the need to write out the model xml
        (works for schema but not dtd. See notes in javax.xml.validation.SchemaFactory)
      - Fixed problem with RM recordsPermissionModel.xml (select -> selected)
   29841: Fixed ALF-9826	"Folder is copied without content even if 'Apply rule to subfolders' check-box is checked"
   - Added "deep-copy" option for Copy action


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29863 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-08-18 11:28:44 +00:00
parent b9b352479e
commit 27dfd5ab17
9 changed files with 566 additions and 22 deletions

View File

@@ -70,8 +70,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import com.aetrion.flickr.auth.AuthUtilities;
/**
* Helper class to house utility methods common to
* more than one Invite Service Web Script
@@ -145,7 +143,7 @@ public class InviteHelper implements InitializingBean
return null;
}
});
addSiteMembership(invitee, siteShortName, role, inviter);
addSiteMembership(invitee, siteShortName, role, inviter, false);
}
/**
@@ -268,14 +266,18 @@ public class InviteHelper implements InitializingBean
* @param role
* @param runAsUser
* @param siteService
* @param overrideExisting
*/
public void addSiteMembership(final String invitee, final String siteName, final String role, final String runAsUser)
public void addSiteMembership(final String invitee, final String siteName, final String role, final String runAsUser, final boolean overrideExisting)
{
AuthenticationUtil.runAs(new RunAsWork<Void>()
{
public Void doWork() throws Exception
{
siteService.setMembership(siteName, invitee, role);
if (overrideExisting || !siteService.isMember(siteName, invitee))
{
siteService.setMembership(siteName, invitee, role);
}
return null;
}
@@ -415,7 +417,7 @@ public class InviteHelper implements InitializingBean
String reviewer = (String)executionVariables.get(WorkflowModelModeratedInvitation.wfVarReviewer);
// Add invitee to the site
addSiteMembership(invitee, siteName, role, reviewer);
addSiteMembership(invitee, siteName, role, reviewer, true);
}
@SuppressWarnings("unchecked")