mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD to BRANCHES/V2.3:
93670: RM-1787. Created FolderDetailsPageUnitTest, updated FolderDetails related blocks 93676: (RECORD ONLY) Changed the version number for RM HEAD to 3.0-SNAPHOT 93721: Updated the README.txt 93745: RM-1800 (Transfers are not displayed for non-rm-admin users) 93764: RM-1825 (Can't move/delete in-place record when outbound rule to Hide Record is set) 93776: RM-1833 (Label for "Add Relationship" is incorrect) 93800: RM-1829 (Text in Auto-Declare Options does not fit the drop-down) 93801: RM-1832 (Hidden record is displayed in Site Activities and Site Content) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@93875 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,9 +22,13 @@ import java.util.List;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.jscript.app.BaseEvaluator;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Evaluates whether the node in question is transferring is either a transfer or accession.
|
||||
@@ -33,6 +37,9 @@ import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
*/
|
||||
public class TransferEvaluator extends BaseEvaluator
|
||||
{
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(TransferEvaluator.class);
|
||||
|
||||
/** indicates whether we are looking for accessions or transfers */
|
||||
private boolean transferAccessionIndicator = false;
|
||||
|
||||
@@ -55,8 +62,18 @@ public class TransferEvaluator extends BaseEvaluator
|
||||
NodeRef transfer = getTransferNodeRef(nodeRef);
|
||||
if (transfer != null)
|
||||
{
|
||||
boolean actual = ((Boolean)nodeService.getProperty(transfer, RecordsManagementModel.PROP_TRANSFER_ACCESSION_INDICATOR)).booleanValue();
|
||||
result = (actual == transferAccessionIndicator);
|
||||
try
|
||||
{
|
||||
boolean actual = ((Boolean)nodeService.getProperty(transfer, RecordsManagementModel.PROP_TRANSFER_ACCESSION_INDICATOR)).booleanValue();
|
||||
result = (actual == transferAccessionIndicator);
|
||||
}
|
||||
catch (AccessDeniedException ade)
|
||||
{
|
||||
logger.info("The user '"
|
||||
+ AuthenticationUtil.getFullyAuthenticatedUser()
|
||||
+ "' does not have permissions on the node '"
|
||||
+ transfer + "'.");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.record;
|
||||
|
||||
import static org.alfresco.model.ContentModel.ASPECT_PENDING_DELETE;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -96,7 +98,9 @@ public class InplaceRecordServiceImpl extends ServiceBaseImpl implements Inplace
|
||||
List<ChildAssociationRef> parentAssocs = nodeService.getParentAssocs(nodeRef);
|
||||
for (ChildAssociationRef childAssociationRef : parentAssocs)
|
||||
{
|
||||
if (!childAssociationRef.isPrimary() && childAssociationRef.getParentRef().equals(originatingLocation))
|
||||
if (!childAssociationRef.isPrimary() &&
|
||||
childAssociationRef.getParentRef().equals(originatingLocation) &&
|
||||
!nodeService.hasAspect(childAssociationRef.getChildRef(), ASPECT_PENDING_DELETE))
|
||||
{
|
||||
nodeService.removeChildAssociation(childAssociationRef);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user