mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1959: User can add/remove relationship to/from record he has read-only permissions for
* integration tests * small fix to service implementation git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@97950 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,16 +30,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*/
|
||||
public class ChangeOrDeleteReferencesCapability extends DeclarativeCapability
|
||||
{
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCapability#evaluateImpl(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected int evaluateImpl(NodeRef nodeRef)
|
||||
{
|
||||
// Can't be sure, because we don't have information about the target so we still abstain
|
||||
return AccessDecisionVoter.ACCESS_ABSTAIN;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.capability.AbstractCapability#evaluate(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
|
@@ -629,9 +629,12 @@ public class RelationshipServiceImpl extends RecordsManagementAdminBase implemen
|
||||
for (AssociationRef associationRef : associationRefs)
|
||||
{
|
||||
String uniqueName = associationRef.getTypeQName().getLocalName();
|
||||
NodeRef from = associationRef.getSourceRef();
|
||||
NodeRef to = associationRef.getTargetRef();
|
||||
relationships.add(new RelationshipImpl(uniqueName, from, to));
|
||||
if (existsRelationshipDefinition(uniqueName))
|
||||
{
|
||||
NodeRef from = associationRef.getSourceRef();
|
||||
NodeRef to = associationRef.getTargetRef();
|
||||
relationships.add(new RelationshipImpl(uniqueName, from, to));
|
||||
}
|
||||
}
|
||||
|
||||
return relationships;
|
||||
@@ -650,9 +653,12 @@ public class RelationshipServiceImpl extends RecordsManagementAdminBase implemen
|
||||
for (ChildAssociationRef childAssociationRef : childAssociationRefs)
|
||||
{
|
||||
String uniqueName = childAssociationRef.getQName().getLocalName();
|
||||
NodeRef from = childAssociationRef.getParentRef();
|
||||
NodeRef to = childAssociationRef.getChildRef();
|
||||
relationships.add(new RelationshipImpl(uniqueName, from, to));
|
||||
if (existsRelationshipDefinition(uniqueName))
|
||||
{
|
||||
NodeRef from = childAssociationRef.getParentRef();
|
||||
NodeRef to = childAssociationRef.getChildRef();
|
||||
relationships.add(new RelationshipImpl(uniqueName, from, to));
|
||||
}
|
||||
}
|
||||
|
||||
return relationships;
|
||||
|
Reference in New Issue
Block a user