mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
15171: Merged V3.1 to V3.2 14215: Fixed ETHREEOH-1314 - WCM - content publisher cannot submit existing folder that has modified properties git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16852 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -578,7 +578,7 @@ public class AssetServiceImplTest extends AbstractWCMServiceImplTest
|
||||
assertEquals("file description", props.get(ContentModel.PROP_DESCRIPTION));
|
||||
|
||||
/* TODO - pending ETHREEOH-1314 - fails for content contributor / content publisher during submit if updating folder properties
|
||||
|
||||
*/
|
||||
// update folder properties - eg. title and description
|
||||
|
||||
newProps = new HashMap<QName, Serializable>(2);
|
||||
@@ -589,7 +589,8 @@ public class AssetServiceImplTest extends AbstractWCMServiceImplTest
|
||||
props = assetService.getAssetProperties(existingFolder1Asset);
|
||||
assertEquals("folder title", props.get(ContentModel.PROP_TITLE));
|
||||
assertEquals("folder description", props.get(ContentModel.PROP_DESCRIPTION));
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -162,7 +162,7 @@ public class SandboxServiceImpl implements SandboxService
|
||||
{
|
||||
ParameterCheck.mandatoryString("wpStoreId", wpStoreId);
|
||||
|
||||
String currentUserName = AuthenticationUtil.getRunAsUser();
|
||||
String currentUserName = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
SandboxInfo sbInfo = null;
|
||||
|
||||
if (! wpService.isWebUser(wpStoreId, currentUserName))
|
||||
@@ -246,7 +246,7 @@ public class SandboxServiceImpl implements SandboxService
|
||||
{
|
||||
ParameterCheck.mandatoryString("wpStoreId", wpStoreId);
|
||||
|
||||
String currentUser = AuthenticationUtil.getRunAsUser();
|
||||
String currentUser = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
|
||||
List<SandboxInfo> sbInfos = null;
|
||||
|
||||
@@ -326,7 +326,7 @@ public class SandboxServiceImpl implements SandboxService
|
||||
|
||||
if (! WCMUtil.isStagingStore(sbStoreId))
|
||||
{
|
||||
String currentUser = AuthenticationUtil.getRunAsUser();
|
||||
String currentUser = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
|
||||
if (! ((WCMUtil.getUserName(sbStoreId).equals(currentUser)) || (wpService.isContentManager(wpStoreId, currentUser))))
|
||||
{
|
||||
@@ -344,7 +344,7 @@ public class SandboxServiceImpl implements SandboxService
|
||||
{
|
||||
ParameterCheck.mandatoryString("wpStoreId", wpStoreId);
|
||||
|
||||
String currentUserName = AuthenticationUtil.getRunAsUser();
|
||||
String currentUserName = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
return getSandbox(WCMUtil.buildUserMainStoreName(WCMUtil.buildStagingStoreName(wpStoreId), currentUserName));
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ public class SandboxServiceImpl implements SandboxService
|
||||
|
||||
String wpStoreId = WCMUtil.getWebProjectStoreId(sbStoreId);
|
||||
|
||||
String currentUserName = AuthenticationUtil.getRunAsUser();
|
||||
String currentUserName = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
if (sbStoreId.equals(WCMUtil.buildUserMainStoreName(wpStoreId, currentUserName)))
|
||||
{
|
||||
// author may delete their own sandbox
|
||||
@@ -725,7 +725,7 @@ public class SandboxServiceImpl implements SandboxService
|
||||
// mysite--workflow-9161f640-b020-11db-8015-130bf9b5b652
|
||||
String workflowMainStoreName = sandboxInfo.getMainStoreName();
|
||||
|
||||
List<AVMDifference> diffs = new ArrayList<AVMDifference>(srcPaths.size());
|
||||
final List<AVMDifference> diffs = new ArrayList<AVMDifference>(srcPaths.size());
|
||||
|
||||
// get diff list - also process expiration dates, if any, and set virt svr update path
|
||||
|
||||
@@ -766,7 +766,15 @@ public class SandboxServiceImpl implements SandboxService
|
||||
}
|
||||
|
||||
// write changes to layer so files are marked as modified
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
avmSyncService.update(diffs, null, false, false, false, false, null, null);
|
||||
return null;
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
return new Pair<SandboxInfo, String>(sandboxInfo, virtUpdatePath);
|
||||
}
|
||||
|
@@ -284,7 +284,7 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
|
||||
|
||||
// TODO: Currently auto-creates author sandbox for creator of web project (eg. an admin or a DM contributor to web projects root space)
|
||||
// NOTE: JSF client does not yet allow explicit creation of author sandboxes
|
||||
inviteWebUser(wpNodeRef, AuthenticationUtil.getRunAsUser(), WCMUtil.ROLE_CONTENT_MANAGER, true);
|
||||
inviteWebUser(wpNodeRef, AuthenticationUtil.getFullyAuthenticatedUser(), WCMUtil.ROLE_CONTENT_MANAGER, true);
|
||||
|
||||
// Bind the post-commit transaction listener with data required for virtualization server notification
|
||||
CreateWebProjectTransactionListener tl = new CreateWebProjectTransactionListener(wpStoreId);
|
||||
@@ -764,7 +764,7 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
|
||||
*/
|
||||
public boolean isContentManager(String storeName)
|
||||
{
|
||||
return isContentManager(storeName, AuthenticationUtil.getRunAsUser());
|
||||
return isContentManager(storeName, AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -780,7 +780,7 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
|
||||
*/
|
||||
public boolean isContentManager(NodeRef wpNodeRef)
|
||||
{
|
||||
return isContentManager(wpNodeRef, AuthenticationUtil.getRunAsUser());
|
||||
return isContentManager(wpNodeRef, AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
Reference in New Issue
Block a user