mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4445] - added condition to check major version 7 (#2148)
* [ACA-4445] - added condition to check major version 7 * [ACA-4445] - fixed lint
This commit is contained in:
@@ -437,7 +437,13 @@ export function canManageFileVersions(context: RuleContext): boolean {
|
||||
* @param context Rule execution context
|
||||
*/
|
||||
export function canEditAspects(context: RuleContext): boolean {
|
||||
return [!isMultiselection(context), canUpdateSelectedNode(context), !isWriteLocked(context), navigation.isNotTrashcan(context)].every(Boolean);
|
||||
return [
|
||||
!isMultiselection(context),
|
||||
canUpdateSelectedNode(context),
|
||||
!isWriteLocked(context),
|
||||
navigation.isNotTrashcan(context),
|
||||
repository.isMajorVersionAvailable(context, '7')
|
||||
].every(Boolean);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -32,3 +32,8 @@ import { RuleContext } from '@alfresco/adf-extensions';
|
||||
export function hasQuickShareEnabled(context: RuleContext): boolean {
|
||||
return context.repository.status.isQuickShareEnabled;
|
||||
}
|
||||
|
||||
export function isMajorVersionAvailable(context: RuleContext, versionNumber: string): boolean {
|
||||
const majorVersion = context.repository.version?.major ? parseInt(context.repository.version.major, 10) : 0;
|
||||
return majorVersion >= parseInt(versionNumber, 10);
|
||||
}
|
||||
|
Reference in New Issue
Block a user