Merged V3.2E to HEAD

17533: Fix for unreported issue for events with multiple days (secondary elements) aren't filtered correctly when view is filtered by tags
   17535: ETHREEOH-3411 - Alert appears when loading My Dashboard when Documents I'm editing dashlet is aded and site name was edited with XSS text
   17536: Fixes for various forms issues (ETHREEOH-3398, ETHREEOH-3273, ETHREEOH-3339 & ALFCOM-3587) and reverted accidentally checked in log4j.properties file
            - Folders can now have tags applied in edit form
            - Working copy nodes have their cm:name property set to protected
            - Removed mandatory marker from checkbox control (if you have a boolean there is always a value so no need to mark as mandatory)
            - Potential security issue
   17537: ETHREEOH-1908 - .docx word documents are not displayed in 'Word Documents' category in 'Document List' component. Also fixed some i18n strings.
   17538: Fix for ETHREEOH-3085 and ETHREEOH-3341.
          - NTLM/Kerberos, Tomcat/JBoss5 and JSF client now play nicely on session timeout and display the correct configured page on first login.
          - Tested Share NTLM works correctly with above changes.
   17539: Fix for ETHREEOH-3368: UI does not show multi-valued MLText propertis as localisable
   17543: Merged DEV_TEMPORARY to V3.2
      17529: Fix for ETHREEOH-3186 & ETHREEOH-3187
   17544: Fix for ETHREEOH-1509 - Manage action is not applied for task resources part from My Tasks tab in Office Addins if user already opens another task.
   17547: Fix for ETHREEOH-1709 - AccessDeniedException - Download Servlet not re-directing user to login page.
          - WebDav path now resolved to a noderef as system user - then the permission test for READ_CONTENT is performed directly on the resulting noderef.
   17548: Fix for ETHREEOH-3137 - Tags created for All day event are not displayed in Tags pane.
   17551: Final part of fix for ETHREEOH-2161 includes solution for ETHREEOH-3270.
          - An admin user can now optionally disable the execute of Rules and the Archive of nodes during a folder delete operation.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18128 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast 2010-01-19 12:01:16 +00:00
parent e994c97f0b
commit 6f2ad02ad1
2 changed files with 39 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import java.util.regex.Pattern;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.forms.AssociationFieldDefinition;
import org.alfresco.repo.forms.FieldDefinition;
import org.alfresco.repo.forms.FieldGroup;
import org.alfresco.repo.forms.Form;
import org.alfresco.repo.forms.FormData;
@ -784,6 +785,41 @@ public abstract class ContentModelFormProcessor<ItemType, PersistType> extends
form.addData(dataKeyName, new Long(content.getSize()));
}
}
/**
* Determines whether the given node represents a working copy, if it does
* the name field is searched for and set to protected as the name field
* should not be edited for a working copy.
*
* If the node is not a working copy this method has no effect.
*
* @param nodeRef NodeRef of node to check and potentially process
* @param form The generated form
*/
protected void processWorkingCopy(NodeRef nodeRef, Form form)
{
// if the node is a working copy ensure that the name field (id present)
// is set to be protected as it can not be edited
if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_WORKING_COPY))
{
// go through fields looking for name field
for (FieldDefinition fieldDef : form.getFieldDefinitions())
{
if (fieldDef.getName().equals(ContentModel.PROP_NAME.toPrefixString(this.namespaceService)))
{
fieldDef.setProtectedField(true);
if (getLogger().isDebugEnabled())
{
getLogger().debug("Set " + ContentModel.PROP_NAME.toPrefixString(this.namespaceService) +
"field to protected as it is a working copy");
}
break;
}
}
}
}
/**
* Retrieves the values of the given association definition on the given

View File

@ -165,6 +165,9 @@ public class NodeFormProcessor extends ContentModelFormProcessor<NodeRef, NodeRe
generateAllAssociationFields(nodeRef, form);
generateTransientFields(nodeRef, form);
}
// process working copy nodes, just returns if it's not
processWorkingCopy(nodeRef, form);
}
/**