[ACS-6278] - disable manage rules for smart folders (#3518)

This commit is contained in:
DominikIwanek
2023-11-14 12:08:07 +01:00
committed by GitHub
parent c9e0f7abe6
commit 57ac20a8c5
4 changed files with 14 additions and 13 deletions

View File

@@ -495,8 +495,7 @@ export const canEditAspects = (context: RuleContext): boolean =>
canUpdateSelectedNode(context),
!isWriteLocked(context),
navigation.isNotTrashcan(context),
repository.isMajorVersionAvailable(context, '7'),
!isSmartFolder(context)
repository.isMajorVersionAvailable(context, '7')
].every(Boolean);
/**
@@ -626,7 +625,7 @@ export function canOpenWithOffice(context: AcaRuleContext): boolean {
return context.permissions.check(file, ['update']);
}
function isSmartFolder(context: RuleContext): boolean {
export function isSmartFolder(context: RuleContext): boolean {
if (!context.selection?.isEmpty) {
const node = context.selection.first;
if (!node?.entry.isFolder) {