mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
APPS-139 changes around capabilities
This commit is contained in:
@@ -158,12 +158,7 @@
|
|||||||
parent="declarativeCapability">
|
parent="declarativeCapability">
|
||||||
<property name="name" value="FileUnfiledRecords"/>
|
<property name="name" value="FileUnfiledRecords"/>
|
||||||
<property name="permission" value="FileUnfiledRecords"/>
|
<property name="permission" value="FileUnfiledRecords"/>
|
||||||
<property name="kinds">
|
<property name="kind" value="RECORD" />
|
||||||
<list>
|
|
||||||
<value>RECORD_FOLDER</value>
|
|
||||||
<value>RECORD</value>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
<property name="conditions">
|
<property name="conditions">
|
||||||
<map>
|
<map>
|
||||||
<entry key="capabilityCondition.filling" value="true"/> <!-- Checks if the user has the filling capability -->
|
<entry key="capabilityCondition.filling" value="true"/> <!-- Checks if the user has the filling capability -->
|
||||||
@@ -281,6 +276,7 @@
|
|||||||
<property name="kinds">
|
<property name="kinds">
|
||||||
<list>
|
<list>
|
||||||
<value>RECORD</value>
|
<value>RECORD</value>
|
||||||
|
<value>RECORD_FOLDER</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<property name="conditions">
|
<property name="conditions">
|
||||||
|
@@ -74,7 +74,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
|||||||
public static final String PARAM_FILE_PLAN = "file-plan";
|
public static final String PARAM_FILE_PLAN = "file-plan";
|
||||||
public static final String PARAM_PATH = "path";
|
public static final String PARAM_PATH = "path";
|
||||||
|
|
||||||
private static final String FILE_UNFILED_RECORDS_CAPABILITY = "FileUnfiledRecords";
|
private static final String EDIT_RECORD_METADATA_CAPABILITY = "EditRecordMetadata";
|
||||||
|
|
||||||
/** Sync Model URI */
|
/** Sync Model URI */
|
||||||
private static final String SYNC_MODEL_1_0_URI = "http://www.alfresco.org/model/sync/1.0";
|
private static final String SYNC_MODEL_1_0_URI = "http://www.alfresco.org/model/sync/1.0";
|
||||||
@@ -213,9 +213,9 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
|||||||
// create record from latest version
|
// create record from latest version
|
||||||
if (destinationRecordFolder != null)
|
if (destinationRecordFolder != null)
|
||||||
{
|
{
|
||||||
boolean hasFilingCapability = capabilityService.hasCapability(destinationRecordFolder, FILE_UNFILED_RECORDS_CAPABILITY);
|
boolean hasCapability = capabilityService.hasCapability(destinationRecordFolder, EDIT_RECORD_METADATA_CAPABILITY);
|
||||||
// validate destination record folder
|
// validate destination record folder
|
||||||
if (hasFilingCapability)
|
if (hasCapability)
|
||||||
{
|
{
|
||||||
NodeRef recordedVersion = recordableVersionService.createRecordFromLatestVersion(destinationRecordFolder, actionedUponNodeRef);
|
NodeRef recordedVersion = recordableVersionService.createRecordFromLatestVersion(destinationRecordFolder, actionedUponNodeRef);
|
||||||
recordService.file(recordedVersion);
|
recordService.file(recordedVersion);
|
||||||
|
Reference in New Issue
Block a user