From 76cd3109ea27d157e80f3bdeeef065a3b8a905a8 Mon Sep 17 00:00:00 2001 From: roxana Date: Tue, 1 Nov 2016 15:25:04 +0200 Subject: [PATCH 01/16] Changed the test a bit to check a more complex case. --- .../disposition/MultipleSchedulesTest.java | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/disposition/MultipleSchedulesTest.java b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/disposition/MultipleSchedulesTest.java index 26d119210d..fc23b3390a 100644 --- a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/disposition/MultipleSchedulesTest.java +++ b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/disposition/MultipleSchedulesTest.java @@ -34,6 +34,10 @@ public class MultipleSchedulesTest extends BaseRMTestCase protected static final String CATEGORY_B_NAME = TEST_PREFIX + "CategoryB"; /** The name to use for the folder within the second category. */ protected static final String FOLDER_B_NAME = TEST_PREFIX + "FolderB"; + /** The name to use for the third category. */ + protected static final String CATEGORY_C_NAME = TEST_PREFIX + "CategoryC"; + /** The name to use for the folder within the third category. */ + protected static final String FOLDER_C_NAME = TEST_PREFIX + "FolderC"; /** The name to use for the record. */ protected static final String RECORD_NAME = TEST_PREFIX + "Record"; @@ -48,6 +52,10 @@ public class MultipleSchedulesTest extends BaseRMTestCase private NodeRef categoryB; /** The folder node within the second category. */ private NodeRef folderB; + /** The third category node. */ + private NodeRef categoryC; + /** The folder node within the third category. */ + private NodeRef folderC; /** The record node. */ private NodeRef record; @@ -82,6 +90,7 @@ public class MultipleSchedulesTest extends BaseRMTestCase // Create two categories. categoryA = filePlanService.createRecordCategory(filePlan, CATEGORY_A_NAME); categoryB = filePlanService.createRecordCategory(filePlan, CATEGORY_B_NAME); + categoryC = filePlanService.createRecordCategory(filePlan, CATEGORY_C_NAME); // Create a disposition schedule for category A (Cut off immediately, then Destroy immediately). DispositionSchedule dispSchedA = utils.createBasicDispositionSchedule(categoryA, "instructions", "authority", true, false); Map cutOffParamsA = ImmutableMap.of(PROP_DISPOSITION_ACTION_NAME, CutOffAction.NAME, @@ -103,9 +112,21 @@ public class MultipleSchedulesTest extends BaseRMTestCase PROP_DISPOSITION_PERIOD, CommonRMTestUtils.PERIOD_ONE_WEEK, PROP_DISPOSITION_PERIOD_PROPERTY, PROP_CUT_OFF_DATE); dispositionService.addDispositionActionDefinition(dispSchedB, destroyParamsB); + // Create a disposition schedule for category C (Cut off immediately, then Destroy one year after cutoff). + DispositionSchedule dispSchedC = utils.createBasicDispositionSchedule(categoryC, "instructions", "authority", true, false); + Map cutOffParamsC = ImmutableMap.of(PROP_DISPOSITION_ACTION_NAME, CutOffAction.NAME, + PROP_DISPOSITION_DESCRIPTION, "description", + PROP_DISPOSITION_PERIOD, CommonRMTestUtils.PERIOD_IMMEDIATELY); + dispositionService.addDispositionActionDefinition(dispSchedC, cutOffParamsC); + Map destroyParamsC = ImmutableMap.of(PROP_DISPOSITION_ACTION_NAME, DestroyAction.NAME, + PROP_DISPOSITION_DESCRIPTION, "description", + PROP_DISPOSITION_PERIOD, CommonRMTestUtils.PERIOD_ONE_YEAR, + PROP_DISPOSITION_PERIOD_PROPERTY, PROP_CUT_OFF_DATE); + dispositionService.addDispositionActionDefinition(dispSchedC, destroyParamsC); // Create a folder within each category. folderA = recordFolderService.createRecordFolder(categoryA, FOLDER_A_NAME); folderB = recordFolderService.createRecordFolder(categoryB, FOLDER_B_NAME); + folderC = recordFolderService.createRecordFolder(categoryC, FOLDER_C_NAME); } /** @@ -123,6 +144,7 @@ public class MultipleSchedulesTest extends BaseRMTestCase test() .given(() -> { setUpFilePlan(); + // Create a record filed under category A and linked to category B. record = fileFolderService.create(folderA, RECORD_NAME, ContentModel.TYPE_CONTENT).getNodeRef(); recordService.link(record, folderB); @@ -187,19 +209,22 @@ public class MultipleSchedulesTest extends BaseRMTestCase test() .given(() -> { setUpFilePlan(); - // Create a record filed under category A and linked to category B. + // Create a record filed under category A and linked to category B and C. record = fileFolderService.create(folderA, RECORD_NAME, ContentModel.TYPE_CONTENT).getNodeRef(); recordService.link(record, folderB); - }) - .when(() -> { + recordService.link(record, folderC); // Cut off the record. dispositionService.cutoffDisposableItem(record); + // Ensure the update has been applied to the record. + internalDispositionService.updateNextDispositionAction(record); + }) + .when(() -> { // Unlink the record from folder B. recordService.unlink(record, folderB); }) .then() - .expect(true) + .expect(false) .from(() -> dispositionService.isNextDispositionActionEligible(record)) - .because("Destroy action should be available, as the record should follow its origin disposition schedule."); + .because("Destroy action shouldn't be available, as the record should follow disposition schedule from category C."); } } From 23493ab550e4981930a9c1b69432b1f02fcd37fd Mon Sep 17 00:00:00 2001 From: roxana Date: Fri, 4 Nov 2016 10:19:24 +0200 Subject: [PATCH 02/16] Update record disposition action as of date if it changed, to have the same value as next disposition action as of date. --- .../RecordsManagementSearchBehaviour.java | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java index 80e3aec4b4..11fc347bce 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java @@ -21,6 +21,7 @@ package org.alfresco.module.org_alfresco_module_rm.model.behaviour; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; +import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -510,12 +511,16 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel */ private void updateDispositionActionProperties(NodeRef record, NodeRef dispositionAction) { - if (!methodCached("updateDispositionActionProperties", record)) + Date recordSearchDispositionActionAsOf = (Date)nodeService.getProperty(record, PROP_RS_DISPOSITION_ACTION_AS_OF); + DispositionAction da = new DispositionActionImpl(recordsManagementServiceRegistry, dispositionAction); + // update disposition action as of if it changed + // @since 2.3.1 + // @see https://issues.alfresco.com/jira/browse/RM-4313 + if (!methodCached("updateDispositionActionProperties", record) + || isDispositionActionAsOfChanged(recordSearchDispositionActionAsOf, da.getAsOfDate())) { Map props = nodeService.getProperties(record); - DispositionAction da = new DispositionActionImpl(recordsManagementServiceRegistry, dispositionAction); - props.put(PROP_RS_DISPOSITION_ACTION_NAME, da.getName()); props.put(PROP_RS_DISPOSITION_ACTION_AS_OF, da.getAsOfDate()); props.put(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, nodeService.getProperty(dispositionAction, PROP_DISPOSITION_EVENTS_ELIGIBLE)); @@ -553,6 +558,22 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel } } } + + /** + * Check if recordSearchDispositionActionAsOf property has been changed + * + * @param currentDate current as of date value + * @param updatedDate new as of date value + * @return true if the as of date has been changed + */ + private boolean isDispositionActionAsOfChanged(Date currentDate, Date updatedDate) + { + if ((currentDate != null && updatedDate == null) || (currentDate == null && updatedDate != null)) + { + return true; + } + return currentDate.compareTo(updatedDate) != 0; + } /** * On update of event execution information behaviour\ From 5200597182e8146f13532412507a334bcfdbbfe1 Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Fri, 14 Oct 2016 18:41:00 +0300 Subject: [PATCH 03/16] RM-4249 - workaround : replaced maxEntries with a positive value (cherry picked from commit 995448081e3b9b54e9fdfaf6087e3d2ef371a65c) --- .../audit/RecordsManagementAuditQueryParameters.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditQueryParameters.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditQueryParameters.java index 4af11575b8..266cfcf3b8 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditQueryParameters.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditQueryParameters.java @@ -31,7 +31,7 @@ import org.alfresco.service.namespace.QName; */ public final class RecordsManagementAuditQueryParameters { - private int maxEntries = -1; + private int maxEntries = Integer.MAX_VALUE; private String user; private NodeRef nodeRef; private Date dateFrom; From 71917d6d17dc02bd7d13660e8c772cee9ac58d78 Mon Sep 17 00:00:00 2001 From: roxana Date: Fri, 4 Nov 2016 17:08:09 +0200 Subject: [PATCH 04/16] Revert changes and removed cache check. --- .../RecordsManagementSearchBehaviour.java | 84 +++++++------------ 1 file changed, 30 insertions(+), 54 deletions(-) diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java index 11fc347bce..ed3c445788 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/behaviour/RecordsManagementSearchBehaviour.java @@ -21,7 +21,6 @@ package org.alfresco.module.org_alfresco_module_rm.model.behaviour; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; -import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -511,68 +510,45 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel */ private void updateDispositionActionProperties(NodeRef record, NodeRef dispositionAction) { - Date recordSearchDispositionActionAsOf = (Date)nodeService.getProperty(record, PROP_RS_DISPOSITION_ACTION_AS_OF); + Map props = nodeService.getProperties(record); + DispositionAction da = new DispositionActionImpl(recordsManagementServiceRegistry, dispositionAction); - // update disposition action as of if it changed - // @since 2.3.1 - // @see https://issues.alfresco.com/jira/browse/RM-4313 - if (!methodCached("updateDispositionActionProperties", record) - || isDispositionActionAsOfChanged(recordSearchDispositionActionAsOf, da.getAsOfDate())) + + props.put(PROP_RS_DISPOSITION_ACTION_NAME, da.getName()); + props.put(PROP_RS_DISPOSITION_ACTION_AS_OF, da.getAsOfDate()); + props.put(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, nodeService.getProperty(dispositionAction, PROP_DISPOSITION_EVENTS_ELIGIBLE)); + + DispositionActionDefinition daDefinition = da.getDispositionActionDefinition(); + if (daDefinition != null) { - Map props = nodeService.getProperties(record); - - props.put(PROP_RS_DISPOSITION_ACTION_NAME, da.getName()); - props.put(PROP_RS_DISPOSITION_ACTION_AS_OF, da.getAsOfDate()); - props.put(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, nodeService.getProperty(dispositionAction, PROP_DISPOSITION_EVENTS_ELIGIBLE)); - - DispositionActionDefinition daDefinition = da.getDispositionActionDefinition(); - if (daDefinition != null) + Period period = daDefinition.getPeriod(); + if (period != null) { - Period period = daDefinition.getPeriod(); - if (period != null) - { - props.put(PROP_RS_DISPOSITION_PERIOD, period.getPeriodType()); - props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, period.getExpression()); - } - else - { - props.put(PROP_RS_DISPOSITION_PERIOD, null); - props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, null); - } + props.put(PROP_RS_DISPOSITION_PERIOD, period.getPeriodType()); + props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, period.getExpression()); } - - nodeService.setProperties(record, props); - - if (logger.isDebugEnabled()) + else { - logger.debug("Set rma:recordSearchDispositionActionName for node " + record + " to: " + - props.get(PROP_RS_DISPOSITION_ACTION_NAME)); - logger.debug("Set rma:recordSearchDispositionActionAsOf for node " + record + " to: " + - props.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); - logger.debug("Set rma:recordSearchDispositionEventsEligible for node " + record + " to: " + - props.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); - logger.debug("Set rma:recordSearchDispositionPeriod for node " + record + " to: " + - props.get(PROP_RS_DISPOSITION_PERIOD)); - logger.debug("Set rma:recordSearchDispositionPeriodExpression for node " + record + " to: " + - props.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); + props.put(PROP_RS_DISPOSITION_PERIOD, null); + props.put(PROP_RS_DISPOSITION_PERIOD_EXPRESSION, null); } } - } - - /** - * Check if recordSearchDispositionActionAsOf property has been changed - * - * @param currentDate current as of date value - * @param updatedDate new as of date value - * @return true if the as of date has been changed - */ - private boolean isDispositionActionAsOfChanged(Date currentDate, Date updatedDate) - { - if ((currentDate != null && updatedDate == null) || (currentDate == null && updatedDate != null)) + + nodeService.setProperties(record, props); + + if (logger.isDebugEnabled()) { - return true; + logger.debug("Set rma:recordSearchDispositionActionName for node " + record + " to: " + + props.get(PROP_RS_DISPOSITION_ACTION_NAME)); + logger.debug("Set rma:recordSearchDispositionActionAsOf for node " + record + " to: " + + props.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); + logger.debug("Set rma:recordSearchDispositionEventsEligible for node " + record + " to: " + + props.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); + logger.debug("Set rma:recordSearchDispositionPeriod for node " + record + " to: " + + props.get(PROP_RS_DISPOSITION_PERIOD)); + logger.debug("Set rma:recordSearchDispositionPeriodExpression for node " + record + " to: " + + props.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); } - return currentDate.compareTo(updatedDate) != 0; } /** From 4d511bd0af133439dc9d1059dd75a0ed17cda009 Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Tue, 18 Oct 2016 18:28:29 +0300 Subject: [PATCH 05/16] fixed audit unit tests (cherry picked from commit e686da88de04f14b7ef2a63594df7424982e8cbc) --- .../RecordsManagementAuditServiceImplTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementAuditServiceImplTest.java b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementAuditServiceImplTest.java index 3188b2cc65..d2245ed565 100644 --- a/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementAuditServiceImplTest.java +++ b/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/RecordsManagementAuditServiceImplTest.java @@ -162,9 +162,9 @@ public class RecordsManagementAuditServiceImplTest extends BaseRMTestCase // "audit.start", "audit.view" and "Update RM Object"; entries = getAuditTrail(3, ADMIN_USER); - assertEquals(entries.get(0).getEvent(), "audit.start"); + assertEquals(entries.get(2).getEvent(), "audit.start"); assertEquals(entries.get(1).getEvent(), "audit.view"); - assertEquals(entries.get(2).getEvent(), "Update RM Object"); + assertEquals(entries.get(0).getEvent(), "Update RM Object"); // New "audit.view" event was generated - will be visible on next getAuditTrail(). @@ -176,14 +176,14 @@ public class RecordsManagementAuditServiceImplTest extends BaseRMTestCase nodeService.deleteNode(record); List entries = getAuditTrail(5, ADMIN_USER); - assertEquals(entries.get(0).getEvent(), "audit.start"); - assertEquals(entries.get(1).getEvent(), "audit.view"); - assertEquals(entries.get(2).getEvent(), "Update RM Object"); + assertEquals(entries.get(4).getEvent(), "audit.start"); assertEquals(entries.get(3).getEvent(), "audit.view"); + assertEquals(entries.get(2).getEvent(), "Update RM Object"); + assertEquals(entries.get(1).getEvent(), "audit.view"); // Show the audit contains a reference to the deleted item: - assertEquals(entries.get(4).getEvent(), "Delete RM Object"); - assertEquals(entries.get(4).getNodeRef(), record); + assertEquals(entries.get(0).getEvent(), "Delete RM Object"); + assertEquals(entries.get(0).getNodeRef(), record); return null; } @@ -203,7 +203,7 @@ public class RecordsManagementAuditServiceImplTest extends BaseRMTestCase // show the audit has been updated List entries = getAuditTrail(3, ADMIN_USER); - final RecordsManagementAuditEntry entry = entries.get(2); + final RecordsManagementAuditEntry entry = entries.get(0); assertNotNull(entry); // investigate the contents of the audit entry From 0a423f1660f0a372bd2710003a57d48e538ef21f Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 9 Nov 2016 13:17:00 +0000 Subject: [PATCH 06/16] Update version to 2.3.1. --- pom.xml | 2 +- rm-automation/pom.xml | 2 +- rm-server/pom.xml | 2 +- temp | 0 4 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 temp diff --git a/pom.xml b/pom.xml index 7d56dd2c18..9ae57a0520 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.alfresco alfresco-rm-parent pom - 2.3.1-SNAPSHOT + 2.3.1 Alfresco Records Management http://www.alfresco.org/ diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index e88c8062f1..f59d7531ff 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-rm-parent - 2.3.1-SNAPSHOT + 2.3.1 diff --git a/rm-server/pom.xml b/rm-server/pom.xml index 7d347cf2a7..2a3146275f 100644 --- a/rm-server/pom.xml +++ b/rm-server/pom.xml @@ -5,7 +5,7 @@ org.alfresco alfresco-rm-parent - 2.3.1-SNAPSHOT + 2.3.1 4.0.0 alfresco-rm-server diff --git a/temp b/temp new file mode 100644 index 0000000000..e69de29bb2 From 1476e389d6b05309d14ecb593689f00da72aad65 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 9 Nov 2016 13:48:25 +0000 Subject: [PATCH 07/16] Update version to 2.3.1.1-SNAPSHOT. --- pom.xml | 2 +- rm-automation/pom.xml | 2 +- rm-server/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9ae57a0520..1a202ae62d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.alfresco alfresco-rm-parent pom - 2.3.1 + 2.3.1.1-SNAPSHOT Alfresco Records Management http://www.alfresco.org/ diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index f59d7531ff..94d74c0504 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-rm-parent - 2.3.1 + 2.3.1.1-SNAPSHOT diff --git a/rm-server/pom.xml b/rm-server/pom.xml index 2a3146275f..63783bd4c6 100644 --- a/rm-server/pom.xml +++ b/rm-server/pom.xml @@ -5,7 +5,7 @@ org.alfresco alfresco-rm-parent - 2.3.1 + 2.3.1.1-SNAPSHOT 4.0.0 alfresco-rm-server From 2377d8e52068743ea73648cd28bfe2fab77da902 Mon Sep 17 00:00:00 2001 From: Mihai Cozma Date: Wed, 9 Nov 2016 17:02:14 +0000 Subject: [PATCH 08/16] Merge branch 'feature/RM-4329_Alfreco_Search_in_colaboration_site_doesn't_work' into 'master' Feature/rm 4329 alfreco search in colaboration site doesn't work See merge request !616 --- .../alfresco/slingshot/rmsearch/faceted/rmsearch.lib.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/slingshot/rmsearch/faceted/rmsearch.lib.js b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/slingshot/rmsearch/faceted/rmsearch.lib.js index 9cb01a588e..32b539f396 100644 --- a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/slingshot/rmsearch/faceted/rmsearch.lib.js +++ b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/slingshot/rmsearch/faceted/rmsearch.lib.js @@ -30,18 +30,18 @@ // Additional properties will also need rendering in rmsearch.get.json.ftl. var getOriginalDocumentItem = getDocumentItem, getOriginalRepositoryItem = getRepositoryItem; -getDocumentItem = function(siteId, containerId, pathParts, node, populate){ +getDocumentItem = function(siteId, containerId, pathParts, node, populate, highlighting){ // Get original Document item. - var item = getOriginalDocumentItem(siteId, containerId, pathParts, node, populate); + var item = getOriginalDocumentItem(siteId, containerId, pathParts, node, populate, highlighting); item.nodeJSON = appUtils.toJSON(node, true); return item; }; -getRepositoryItem = function(folderPath, node, populate){ +getRepositoryItem = function(folderPath, node, populate, highlighting){ // Get Original Repo item - var item = getOriginalRepositoryItem(folderPath, node, populate); + var item = getOriginalRepositoryItem(folderPath, node, populate, highlighting); if (item.type === "document") { item.nodeJSON = appUtils.toJSON(node, true); From 46230c118128f7c4049c1cfed2cadf24bae1f3fa Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 11 Nov 2016 15:39:37 +0000 Subject: [PATCH 09/16] Remove spurious temp file. --- temp | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 temp diff --git a/temp b/temp deleted file mode 100644 index e69de29bb2..0000000000 From a5da3040d75a80dcac1f74ea55e9641043929c3b Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Fri, 11 Nov 2016 18:30:14 +0200 Subject: [PATCH 10/16] RM-4357 - defined allowable operations using RM's capabilities --- .../rm-public-rest-context.xml | 1 + .../rm/rest/api/impl/RMNodesImpl.java | 76 ++++++++++++++----- 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml index 2f8e766d91..2f92b31328 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml @@ -27,6 +27,7 @@ + diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java index b127e2fbe1..66976f5a0b 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java @@ -37,6 +37,7 @@ import java.util.concurrent.ConcurrentHashMap; import org.alfresco.model.ContentModel; import org.alfresco.module.org_alfresco_module_rm.RecordsManagementServiceRegistry; +import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService; import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule; import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; @@ -64,6 +65,8 @@ import org.alfresco.service.namespace.QName; import org.alfresco.util.Pair; import org.alfresco.util.ParameterCheck; +import net.sf.acegisecurity.vote.AccessDecisionVoter; + /** * Centralizes access to the repository. * @@ -84,6 +87,7 @@ public class RMNodesImpl extends NodesImpl implements RMNodes private Repository repositoryHelper; private DictionaryService dictionaryService; private DispositionService dispositionService; + private CapabilityService capabilityService; /** * TODO to remove this after isSpecialNode is made protected in core implementation(REPO-1459) @@ -113,6 +117,11 @@ public class RMNodesImpl extends NodesImpl implements RMNodes this.filePlanService = filePlanService; } + public void setCapabilityService(CapabilityService capabilityService) + { + this.capabilityService = capabilityService; + } + @Override public Node getFolderOrDocument(final NodeRef nodeRef, NodeRef parentNodeRef, QName nodeTypeQName, List includeParam, Map mapUserInfo) { @@ -123,26 +132,6 @@ public class RMNodesImpl extends NodesImpl implements RMNodes nodeTypeQName = nodeService.getType(nodeRef); } - //TODO to remove this part of code after isSpecialNode will be made protected on core, will not need this anymore since the right allowed operations will be returned from core(REPO-1459). - if (includeParam.contains(PARAM_INCLUDE_ALLOWABLEOPERATIONS) && originalNode.getAllowableOperations() != null) - { - List allowableOperations = originalNode.getAllowableOperations(); - List modifiedAllowableOperations = new ArrayList<>(); - modifiedAllowableOperations.addAll(allowableOperations); - - for (String op : allowableOperations) - { - if (op.equals(OP_DELETE) && (isSpecialNode(nodeRef, nodeTypeQName))) - { - // special case: do not return "delete" (as an allowable op) for specific system nodes - modifiedAllowableOperations.remove(op); - } - } - - originalNode.setAllowableOperations((modifiedAllowableOperations.size() > 0 )? modifiedAllowableOperations : null); - } - - RMNodeType type = getType(nodeTypeQName, nodeRef); FileplanComponentNode node = null; if (mapUserInfo == null) @@ -193,9 +182,56 @@ public class RMNodesImpl extends NodesImpl implements RMNodes } } + if (includeParam.contains(PARAM_INCLUDE_ALLOWABLEOPERATIONS)) + { + node.setAllowableOperations(getAllowableOperations(nodeRef, type)); + } + return node; } + /** + * Helper method that generates allowable operation for the provided node + * @param nodeRef the node to get the allowable operations for + * @param type the type of the provided nodeRef + * @return a sublist of [{@link Nodes.OP_DELETE}, {@link Nodes.OP_CREATE}, {@link Nodes.OP_UPDATE}] representing the allowable operations for the provided node + */ + private List getAllowableOperations(NodeRef nodeRef, RMNodeType type) + { + List allowableOperations = new ArrayList<>(); + + NodeRef filePlan = filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID); + boolean isFilePlan = nodeRef.equals(filePlan); + boolean isTransferContainer = nodeRef.equals(filePlanService.getTransferContainer(filePlan)); + boolean isUnfiledContainer = nodeRef.equals(filePlanService.getUnfiledContainer(filePlan)); + boolean isHoldsContainer = nodeRef.equals(filePlanService.getHoldContainer(filePlan)) ; + boolean isSpecialContainer = isFilePlan || isTransferContainer || isUnfiledContainer || isHoldsContainer; + + // DELETE + if(!isSpecialContainer && + capabilityService.getCapability("Delete").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) + { + allowableOperations.add(OP_DELETE); + } + + // CREATE + if(type != RMNodeType.FILE && + !isFilePlan && + !isTransferContainer && + capabilityService.getCapability("Create").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) + { + allowableOperations.add(OP_CREATE); + } + + // UPDATE + if (capabilityService.getCapability("Update").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) + { + allowableOperations.add(OP_UPDATE); + } + + return allowableOperations; + } + @Override public NodeRef validateNode(String nodeId) { From dd86bd3cc7695633c7c9a15acf2696103e220baa Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Mon, 14 Nov 2016 18:16:04 +0200 Subject: [PATCH 11/16] RM-4357 - change addChildren capability and updated unit tests --- .../rm/rest/api/impl/RMNodesImpl.java | 2 +- .../rm/rest/api/impl/RMNodesImplUnitTest.java | 97 +++++++++++++------ 2 files changed, 66 insertions(+), 33 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java index 66976f5a0b..20c0c2a9bd 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java @@ -218,7 +218,7 @@ public class RMNodesImpl extends NodesImpl implements RMNodes if(type != RMNodeType.FILE && !isFilePlan && !isTransferContainer && - capabilityService.getCapability("Create").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) + capabilityService.getCapability("FillingPermissionOnly").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) { allowableOperations.add(OP_CREATE); } diff --git a/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java b/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java index 3ae63a99c2..6e0fb649eb 100644 --- a/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java +++ b/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java @@ -30,7 +30,6 @@ package org.alfresco.rm.rest.api.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; @@ -45,6 +44,8 @@ import java.util.ArrayList; import java.util.List; import org.alfresco.model.ContentModel; +import org.alfresco.module.org_alfresco_module_rm.capability.Capability; +import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService; import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule; import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; import org.alfresco.module.org_alfresco_module_rm.test.util.AlfMock; @@ -74,6 +75,8 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import net.sf.acegisecurity.vote.AccessDecisionVoter; + /** * Unit Test class for RMNodesImpl. * @@ -103,10 +106,17 @@ public class RMNodesImplUnitTest extends BaseUnitTest @Mock private ServiceRegistry mockedServiceRegistry; + + @Mock + private CapabilityService mockedCapabilityService; @InjectMocks private RMNodesImpl rmNodesImpl; + private Capability deleteCapability; + private Capability createCapability; + private Capability updateCapability; + @Before public void before() { @@ -117,6 +127,12 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(mockedNamespaceService.getPrefixes(any(String.class))).thenReturn(prefixes); when(mockedNamespaceService.getNamespaceURI(any(String.class))).thenReturn(RM_URI); + deleteCapability = mock(Capability.class); + when(mockedCapabilityService.getCapability("Delete")).thenReturn(deleteCapability); + createCapability = mock(Capability.class); + when(mockedCapabilityService.getCapability("FillingPermissionOnly")).thenReturn(createCapability); + updateCapability = mock(Capability.class); + when(mockedCapabilityService.getCapability("Update")).thenReturn(updateCapability); } @Test @@ -160,19 +176,13 @@ public class RMNodesImplUnitTest extends BaseUnitTest setPermissions(nodeRef, AccessStatus.ALLOWED); + when(deleteCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(createCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(mockedFilePlanService.getFilePlanBySiteId(RM_SITE_ID)).thenReturn(nodeRef); Node folderOrDocument = rmNodesImpl.getFolderOrDocument(nodeRef, null, null, includeParamList, null); - assertNotNull(folderOrDocument); - assertTrue(FileplanComponentNode.class.isInstance(folderOrDocument)); - - FileplanComponentNode resultNode = (FileplanComponentNode) folderOrDocument; - assertEquals(false, resultNode.getIsRecordFolder()); - assertEquals(false, resultNode.getIsFile()); - assertEquals(false, resultNode.getIsCategory()); - List allowableOperations = resultNode.getAllowableOperations(); - assertTrue("Create operation should be available for FilePlan.", allowableOperations.contains(RMNodes.OP_CREATE)); - assertTrue("Update operation should be available for FilePlan.", allowableOperations.contains(RMNodes.OP_UPDATE)); - assertFalse("Delete operation should note be available for FilePlan.", allowableOperations.contains(RMNodes.OP_DELETE)); + checksAllowedOperations(folderOrDocument, false, true, false); } @Test @@ -203,15 +213,15 @@ public class RMNodesImplUnitTest extends BaseUnitTest assertEquals(false, resultNode.getIsFile()); assertEquals(false, resultNode.getIsCategory()); List allowableOperations = resultNode.getAllowableOperations(); - assertNull(allowableOperations); + assertEquals(0, allowableOperations.size()); } @Test public void testGetTransferContainerAllowableOperations() throws Exception { NodeRef nodeRef = AlfMock.generateNodeRef(mockedNodeService); - when(mockedNodeService.getType(nodeRef)).thenReturn(RecordsManagementModel.TYPE_RECORD_CATEGORY); - when(mockedDictionaryService.isSubClass(RecordsManagementModel.TYPE_RECORD_CATEGORY, ContentModel.TYPE_FOLDER)).thenReturn(true); + when(mockedNodeService.getType(nodeRef)).thenReturn(RecordsManagementModel.TYPE_TRANSFER_CONTAINER); + when(mockedDictionaryService.isSubClass(RecordsManagementModel.TYPE_TRANSFER_CONTAINER, ContentModel.TYPE_FOLDER)).thenReturn(true); setupCompanyHomeAndPrimaryParent(nodeRef); @@ -224,16 +234,22 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(mockedFilePlanService.getFilePlanBySiteId(RM_SITE_ID)).thenReturn(filePlanNodeRef); when(mockedFilePlanService.getTransferContainer(filePlanNodeRef)).thenReturn(nodeRef); + when(deleteCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(createCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_DENIED); + + when(mockedFilePlanService.isFilePlanComponent(nodeRef)).thenReturn(true); + Node folderOrDocument = rmNodesImpl.getFolderOrDocument(nodeRef, null, null, includeParamList, null); - checkSpecialContainersAllowedOperations(folderOrDocument); + checksAllowedOperations(folderOrDocument, false, false, false); } @Test public void testGetHoldContainerAllowableOperations() throws Exception { NodeRef nodeRef = AlfMock.generateNodeRef(mockedNodeService); - when(mockedNodeService.getType(nodeRef)).thenReturn(RecordsManagementModel.TYPE_RECORD_CATEGORY); - when(mockedDictionaryService.isSubClass(RecordsManagementModel.TYPE_RECORD_CATEGORY, ContentModel.TYPE_FOLDER)).thenReturn(true); + when(mockedNodeService.getType(nodeRef)).thenReturn(RecordsManagementModel.TYPE_HOLD_CONTAINER); + when(mockedDictionaryService.isSubClass(RecordsManagementModel.TYPE_HOLD_CONTAINER, ContentModel.TYPE_FOLDER)).thenReturn(true); setupCompanyHomeAndPrimaryParent(nodeRef); @@ -250,16 +266,22 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(mockedFilePlanService.getHoldContainer(filePlanNodeRef)).thenReturn(nodeRef); + when(deleteCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(createCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_DENIED); + + when(mockedFilePlanService.isFilePlanComponent(nodeRef)).thenReturn(true); + Node folderOrDocument = rmNodesImpl.getFolderOrDocument(nodeRef, null, null, includeParamList, null); - checkSpecialContainersAllowedOperations(folderOrDocument); + checksAllowedOperations(folderOrDocument, true, false, false); } @Test public void testGetUnfiledContainerAllowableOperations() throws Exception { NodeRef nodeRef = AlfMock.generateNodeRef(mockedNodeService); - when(mockedNodeService.getType(nodeRef)).thenReturn(RecordsManagementModel.TYPE_RECORD_CATEGORY); - when(mockedDictionaryService.isSubClass(RecordsManagementModel.TYPE_RECORD_CATEGORY, ContentModel.TYPE_FOLDER)).thenReturn(true); + when(mockedNodeService.getType(nodeRef)).thenReturn(RecordsManagementModel.TYPE_UNFILED_RECORD_CONTAINER); + when(mockedDictionaryService.isSubClass(RecordsManagementModel.TYPE_UNFILED_RECORD_CONTAINER, ContentModel.TYPE_FOLDER)).thenReturn(true); setupCompanyHomeAndPrimaryParent(nodeRef); @@ -279,8 +301,14 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(mockedFilePlanService.getUnfiledContainer(filePlanNodeRef)).thenReturn(nodeRef); + when(deleteCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(createCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); + when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_DENIED); + + when(mockedFilePlanService.isFilePlanComponent(nodeRef)).thenReturn(true); + Node folderOrDocument = rmNodesImpl.getFolderOrDocument(nodeRef, null, null, includeParamList, null); - checkSpecialContainersAllowedOperations(folderOrDocument); + checksAllowedOperations(folderOrDocument, true, false, false); } @Test @@ -741,18 +769,23 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(mockedPermissionService.hasPermission(nodeRef, PermissionService.ADD_CHILDREN)).thenReturn(permissionToSet); } - private void checkSpecialContainersAllowedOperations(Node containerNode) + private void checksAllowedOperations(Node containerNode, boolean allowCreate, boolean allowUpdate, boolean allowDelete) { assertNotNull(containerNode); - assertTrue(RecordCategoryNode.class.isInstance(containerNode)); - - RecordCategoryNode resultNode = (RecordCategoryNode) containerNode; - assertEquals(false, resultNode.getIsRecordFolder()); - assertEquals(false, resultNode.getIsFile()); - assertEquals(true, resultNode.getIsCategory()); + assertTrue(FileplanComponentNode.class.isInstance(containerNode)); + FileplanComponentNode resultNode = (FileplanComponentNode) containerNode; List allowableOperations = resultNode.getAllowableOperations(); - assertTrue("Create operation should be available for provided container.", allowableOperations.contains(RMNodes.OP_CREATE)); - assertTrue("Update operation should be available for provided container.", allowableOperations.contains(RMNodes.OP_UPDATE)); - assertFalse("Delete operation should note be available for provided container.", allowableOperations.contains(RMNodes.OP_DELETE)); + + assertEquals("Create operation should " + (allowCreate?"":"not ") + "be available for provided container.", + allowCreate, + allowableOperations.contains(RMNodes.OP_CREATE)); + + assertEquals("Update operation should " + (allowCreate?"":"not ") + "be available for provided container.", + allowUpdate, + allowableOperations.contains(RMNodes.OP_UPDATE)); + + assertEquals("Delete operation should " + (allowCreate?"":"not ") + "be available for provided container.", + allowDelete, + allowableOperations.contains(RMNodes.OP_DELETE)); } } From 14cde7a0f4672f9ea63feb38f4e26ab556c84c74 Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Tue, 15 Nov 2016 10:47:11 +0200 Subject: [PATCH 12/16] RM-4357 - added spcial container check for update --- .../source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java index 20c0c2a9bd..d15ee2aaef 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java @@ -224,7 +224,8 @@ public class RMNodesImpl extends NodesImpl implements RMNodes } // UPDATE - if (capabilityService.getCapability("Update").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) + if ( !isTransferContainer && !isUnfiledContainer && !isHoldsContainer && + capabilityService.getCapability("Update").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) { allowableOperations.add(OP_UPDATE); } From abcfede1ae1f5e54cbc04a669b114a93d696863f Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Wed, 16 Nov 2016 15:33:11 +0200 Subject: [PATCH 13/16] RM-4357 - updated allowable operations to reflect the edit permissions changes for special containers made in RM-4373 --- .../source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java index d15ee2aaef..20c0c2a9bd 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java @@ -224,8 +224,7 @@ public class RMNodesImpl extends NodesImpl implements RMNodes } // UPDATE - if ( !isTransferContainer && !isUnfiledContainer && !isHoldsContainer && - capabilityService.getCapability("Update").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) + if (capabilityService.getCapability("Update").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) { allowableOperations.add(OP_UPDATE); } From 87f03919227c9bd084f54155e4b8b38964033f0b Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Wed, 16 Nov 2016 16:19:16 +0200 Subject: [PATCH 14/16] RM-4357 - updated unit tests --- .../rm/rest/api/impl/RMNodesImplUnitTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java b/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java index 6e0fb649eb..abbb8e9aa7 100644 --- a/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java +++ b/rm-community/rm-community-repo/unit-test/java/org/alfresco/rm/rest/api/impl/RMNodesImplUnitTest.java @@ -236,12 +236,12 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(deleteCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); when(createCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); - when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_DENIED); + when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); when(mockedFilePlanService.isFilePlanComponent(nodeRef)).thenReturn(true); Node folderOrDocument = rmNodesImpl.getFolderOrDocument(nodeRef, null, null, includeParamList, null); - checksAllowedOperations(folderOrDocument, false, false, false); + checksAllowedOperations(folderOrDocument, false, true, false); } @Test @@ -268,12 +268,12 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(deleteCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); when(createCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); - when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_DENIED); + when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); when(mockedFilePlanService.isFilePlanComponent(nodeRef)).thenReturn(true); Node folderOrDocument = rmNodesImpl.getFolderOrDocument(nodeRef, null, null, includeParamList, null); - checksAllowedOperations(folderOrDocument, true, false, false); + checksAllowedOperations(folderOrDocument, true, true, false); } @Test @@ -303,12 +303,12 @@ public class RMNodesImplUnitTest extends BaseUnitTest when(deleteCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); when(createCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); - when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_DENIED); + when(updateCapability.evaluate(nodeRef)).thenReturn(AccessDecisionVoter.ACCESS_GRANTED); when(mockedFilePlanService.isFilePlanComponent(nodeRef)).thenReturn(true); Node folderOrDocument = rmNodesImpl.getFolderOrDocument(nodeRef, null, null, includeParamList, null); - checksAllowedOperations(folderOrDocument, true, false, false); + checksAllowedOperations(folderOrDocument, true, true, false); } @Test From 3e1d740d76f269188d598fba162760b557b8ba14 Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Wed, 16 Nov 2016 22:01:38 +0000 Subject: [PATCH 15/16] RM-4378: Changed @since value from 1.0 to 2.6 --- .../rest/rm/model/fileplancomponents/FilePlanComponent.java | 2 +- .../rm/model/fileplancomponents/FilePlanComponentAlias.java | 2 +- .../rm/model/fileplancomponents/FilePlanComponentEntry.java | 2 +- .../rm/model/fileplancomponents/FilePlanComponentFields.java | 2 +- .../model/fileplancomponents/FilePlanComponentIdNamePair.java | 2 +- .../rest/rm/model/fileplancomponents/FilePlanComponentPath.java | 2 +- .../model/fileplancomponents/FilePlanComponentProperties.java | 2 +- .../rest/rm/model/fileplancomponents/FilePlanComponentType.java | 2 +- .../rm/model/fileplancomponents/FilePlanComponentUserInfo.java | 2 +- .../model/fileplancomponents/FilePlanComponentsCollection.java | 2 +- .../alfresco/rest/rm/model/fileplancomponents/ReviewPeriod.java | 2 +- .../src/main/java/org/alfresco/rest/rm/model/site/RMSite.java | 2 +- .../java/org/alfresco/rest/rm/model/site/RMSiteCompliance.java | 2 +- .../main/java/org/alfresco/rest/rm/model/site/RMSiteFields.java | 2 +- .../org/alfresco/rest/rm/requests/FilePlanComponentAPI.java | 2 +- .../src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java | 2 +- .../src/main/java/org/alfresco/rest/rm/util/ParameterCheck.java | 2 +- .../java/org/alfresco/rest/rm/base/AllowableOperations.java | 2 +- .../src/test/java/org/alfresco/rest/rm/base/BaseRestTest.java | 2 +- .../src/test/java/org/alfresco/rest/rm/base/TestData.java | 2 +- .../org/alfresco/rest/rm/fileplancomponents/FilePlanTests.java | 2 +- .../alfresco/rest/rm/fileplancomponents/RecordCategoryTest.java | 2 +- .../alfresco/rest/rm/fileplancomponents/RecordFolderTests.java | 2 +- .../src/test/java/org/alfresco/rest/rm/site/RMSiteTests.java | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponent.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponent.java index 6a9f1691a4..0843a5e840 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponent.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponent.java @@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * POJO for file plan component * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public class FilePlanComponent { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentAlias.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentAlias.java index c4ace365e8..e5929014f8 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentAlias.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentAlias.java @@ -17,7 +17,7 @@ import static org.alfresco.rest.rm.util.ParameterCheck.mandatoryString; * File plan component alias enumeration * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public enum FilePlanComponentAlias { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentEntry.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentEntry.java index 3d3bd42609..70bd836090 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentEntry.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentEntry.java @@ -21,7 +21,7 @@ import org.alfresco.rest.core.RestModels; * POJO for file plan component entry * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public class FilePlanComponentEntry extends RestModels { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentFields.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentFields.java index 7fc8c356df..9d8415d960 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentFields.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentFields.java @@ -15,7 +15,7 @@ package org.alfresco.rest.rm.model.fileplancomponents; * File plan component field names constants * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public class FilePlanComponentFields { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentIdNamePair.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentIdNamePair.java index 019085c12a..a7d5f1f9c3 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentIdNamePair.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentIdNamePair.java @@ -15,7 +15,7 @@ package org.alfresco.rest.rm.model.fileplancomponents; * POJO for id/name pair * * @author Kristijan Conkas - * @since 1.0 + * @since 2.6 */ public class FilePlanComponentIdNamePair { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentPath.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentPath.java index 084b2c08ad..3e75c01396 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentPath.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentPath.java @@ -19,7 +19,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; * POJO for FilePlanComponent path parameter *
* @author Kristijan Conkas - * @since 1.0 + * @since 2.6 */ @JsonIgnoreProperties(ignoreUnknown = true) public class FilePlanComponentPath diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentProperties.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentProperties.java index 5f40de6f83..a7179e831a 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentProperties.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentProperties.java @@ -28,7 +28,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * POJO for file plan component properties * * @author Kristijan Conkas - * @since 1.0 + * @since 2.6 */ //FIXME: Once the fields have been added the JsonIgnoreProperties annotation should be removed @JsonIgnoreProperties (ignoreUnknown = true) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentType.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentType.java index aa4eda6563..498be5e202 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentType.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentType.java @@ -17,7 +17,7 @@ import static org.alfresco.rest.rm.util.ParameterCheck.mandatoryString; * File plan component type enumeration * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public enum FilePlanComponentType { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentUserInfo.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentUserInfo.java index 2a79da8b9e..7983cd9250 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentUserInfo.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentUserInfo.java @@ -15,7 +15,7 @@ package org.alfresco.rest.rm.model.fileplancomponents; * POJO for file plan component created by object * * @author Kristijan Conkas - * @since 1.0 + * @since 2.6 */ public class FilePlanComponentUserInfo { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentsCollection.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentsCollection.java index 0b50a94d56..5cee5e7629 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentsCollection.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/FilePlanComponentsCollection.java @@ -17,7 +17,7 @@ import org.alfresco.rest.core.RestModels; * Handle collection of FilePlanComponents * * @author Kristijan Conkas - * @since 1.0 + * @since 2.6 */ public class FilePlanComponentsCollection extends RestModels { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/ReviewPeriod.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/ReviewPeriod.java index ba7fa00564..c96a2bc9f9 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/ReviewPeriod.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/fileplancomponents/ReviewPeriod.java @@ -4,7 +4,7 @@ package org.alfresco.rest.rm.model.fileplancomponents; * POJO for the review period * * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ public class ReviewPeriod { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSite.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSite.java index c68d56bf96..08846558f9 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSite.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSite.java @@ -19,7 +19,7 @@ import org.alfresco.rest.model.RestSiteModel; * POJO for RM Site component * * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ public class RMSite extends RestSiteModel { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteCompliance.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteCompliance.java index c2b57860bf..96b16a678d 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteCompliance.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteCompliance.java @@ -15,7 +15,7 @@ package org.alfresco.rest.rm.model.site; * RM Site compliance * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public enum RMSiteCompliance { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteFields.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteFields.java index 075b9e1b87..4dd9cf918d 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteFields.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/model/site/RMSiteFields.java @@ -24,7 +24,7 @@ package org.alfresco.rest.rm.model.site; *} * @author Tuna Aksoy * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ public class RMSiteFields { diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/FilePlanComponentAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/FilePlanComponentAPI.java index de87b72593..a29146e434 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/FilePlanComponentAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/FilePlanComponentAPI.java @@ -33,7 +33,7 @@ import org.springframework.stereotype.Component; * * @author Tuna Aksoy * @author Kristijan Conkas - * @since 1.0 + * @since 2.6 */ @Component @Scope(value = "prototype") diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java index 44ed0e9c38..11e5ca45ba 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/requests/RMSiteAPI.java @@ -31,7 +31,7 @@ import org.springframework.stereotype.Component; * * @author Tuna Aksoy * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ @Component @Scope (value = "prototype") diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/util/ParameterCheck.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/util/ParameterCheck.java index 49e7a56eb5..462d832ff4 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/util/ParameterCheck.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/util/ParameterCheck.java @@ -17,7 +17,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; * Utility class for checking parameters * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public class ParameterCheck { diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/AllowableOperations.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/AllowableOperations.java index d11d730c9d..e50a7f07ff 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/AllowableOperations.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/AllowableOperations.java @@ -15,7 +15,7 @@ package org.alfresco.rest.rm.base; * List of allowable operations * * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public class AllowableOperations { diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/BaseRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/BaseRestTest.java index 6129987124..089120d436 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/BaseRestTest.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/BaseRestTest.java @@ -50,7 +50,7 @@ import org.testng.annotations.BeforeClass; * * @author Kristijan Conkas * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ @Configuration @PropertySource("classpath:default.properties") diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/TestData.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/TestData.java index 9adde5de57..45acbf1662 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/TestData.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/base/TestData.java @@ -27,7 +27,7 @@ import org.testng.annotations.DataProvider; * Test data used in tests * * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ public interface TestData { diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/FilePlanTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/FilePlanTests.java index 574f4f14bb..3c9bb4b5a2 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/FilePlanTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/FilePlanTests.java @@ -52,7 +52,7 @@ import org.testng.annotations.Test; * the File Plan CRUD API * * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ public class FilePlanTests extends BaseRestTest { diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordCategoryTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordCategoryTest.java index d1f18bd2eb..2a6c30f329 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordCategoryTest.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordCategoryTest.java @@ -51,7 +51,7 @@ import org.testng.annotations.Test; * * @author Kristijan Conkas * @author Tuna Aksoy - * @since 1.0 + * @since 2.6 */ public class RecordCategoryTest extends BaseRestTest { diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordFolderTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordFolderTests.java index 0c9b1e8de5..9b0fd45e1a 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordFolderTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/fileplancomponents/RecordFolderTests.java @@ -61,7 +61,7 @@ import org.testng.annotations.Test; * the Record Folder CRUD API * * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ public class RecordFolderTests extends BaseRestTest { diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/site/RMSiteTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/site/RMSiteTests.java index c3bee9cfab..3919935fac 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/site/RMSiteTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/site/RMSiteTests.java @@ -51,7 +51,7 @@ import org.testng.annotations.Test; * the RM site CRUD API * * @author Rodica Sutu - * @since 1.0 + * @since 2.6 */ public class RMSiteTests extends BaseRestTest { From 1cfc8e93d6fb7f4357f2e07b38c6a29bbdf7d0d7 Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Thu, 17 Nov 2016 10:26:58 +0200 Subject: [PATCH 16/16] RM-4357 - allow create children for fileplan --- .../source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java index 20c0c2a9bd..b5bd4267f3 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/RMNodesImpl.java @@ -216,7 +216,6 @@ public class RMNodesImpl extends NodesImpl implements RMNodes // CREATE if(type != RMNodeType.FILE && - !isFilePlan && !isTransferContainer && capabilityService.getCapability("FillingPermissionOnly").evaluate(nodeRef) == AccessDecisionVoter.ACCESS_GRANTED) {