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:
@@ -43,6 +43,7 @@ import org.alfresco.config.JNDIConstants;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.WCMAppModel;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.web.scripts.FileTypeImageUtils;
|
||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||
import org.alfresco.service.cmr.avm.AVMService;
|
||||
@@ -335,16 +336,18 @@ public class SubmitDialog extends BaseDialogBean
|
||||
}
|
||||
}
|
||||
|
||||
final String finalWorkflowName = workflowName;
|
||||
|
||||
List<ItemWrapper> items = getSubmitItems();
|
||||
|
||||
List<String> relativePaths = new ArrayList<String>(items.size());
|
||||
final List<String> relativePaths = new ArrayList<String>(items.size());
|
||||
|
||||
for (ItemWrapper wrapper : items)
|
||||
{
|
||||
relativePaths.add(AVMUtil.getStoreRelativePath(wrapper.getDescriptor().getPath()));
|
||||
}
|
||||
|
||||
String sbStoreId = this.avmBrowseBean.getSandbox();
|
||||
final String sbStoreId = this.avmBrowseBean.getSandbox();
|
||||
|
||||
String submitLabel = this.label;
|
||||
String submitComment = this.comment;
|
||||
@@ -358,11 +361,26 @@ public class SubmitDialog extends BaseDialogBean
|
||||
submitComment = submitComment.substring(0, 255);
|
||||
}
|
||||
|
||||
final String finalSubmitLabel = submitLabel;
|
||||
final String finalSubmitComment = submitComment;
|
||||
|
||||
// note: always submit via workflow (if no workflow selected, then defaults to direct submit workflow)
|
||||
getSandboxService().submitListAssets(sbStoreId, relativePaths,
|
||||
workflowName, workflowParams,
|
||||
submitLabel, submitComment,
|
||||
expirationDates, launchDate, validateLinks, autoDeploy);
|
||||
|
||||
// This nees to run with higher rights to push into the work flow store ....
|
||||
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>() {
|
||||
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
getSandboxService().submitListAssets(sbStoreId, relativePaths,
|
||||
finalWorkflowName, workflowParams,
|
||||
finalSubmitLabel, finalSubmitComment,
|
||||
expirationDates, launchDate, validateLinks, autoDeploy);
|
||||
return null;
|
||||
}
|
||||
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
|
||||
// if we get this far return the default outcome
|
||||
outcome = this.getDefaultFinishOutcome();
|
||||
|
Reference in New Issue
Block a user