diff --git a/projects/aca-shared/src/lib/services/app.extension.service.ts b/projects/aca-shared/src/lib/services/app.extension.service.ts index 25c1330da5..74b198ed31 100644 --- a/projects/aca-shared/src/lib/services/app.extension.service.ts +++ b/projects/aca-shared/src/lib/services/app.extension.service.ts @@ -28,30 +28,30 @@ import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import { AppStore, getRuleContext } from '@alfresco/aca-shared/store'; import { - SelectionState, - NavigationState, - ExtensionConfig, - RuleEvaluator, ContentActionRef, ContentActionType, + DocumentListPresetRef, + ExtensionConfig, ExtensionLoaderService, - SidebarTabRef, - NavBarGroupRef, - sortByOrder, - reduceSeparators, - reduceEmptyMenus, + ExtensionRef, ExtensionService, - ProfileState, + IconRef, + mergeArrays, mergeObjects, - ExtensionRef, + NavBarGroupRef, + NavigationState, + ProfileState, + reduceEmptyMenus, + reduceSeparators, RuleContext, - DocumentListPresetRef, - IconRef, - mergeArrays + RuleEvaluator, + SelectionState, + SidebarTabRef, + sortByOrder } from '@alfresco/adf-extensions'; import { AppConfigService, AuthenticationService, LogService } from '@alfresco/adf-core'; import { BehaviorSubject, Observable } from 'rxjs'; -import { RepositoryInfo, NodeEntry } from '@alfresco/js-api'; +import { NodeEntry, RepositoryInfo } from '@alfresco/js-api'; import { ViewerRules } from '../models/viewer.rules'; import { Badge, SettingsGroupRef } from '../models/types'; import { NodePermissionService } from '../services/node-permission.service'; @@ -496,6 +496,9 @@ export class AppExtensionService implements RuleContext { filterVisible(action: ContentActionRef | SettingsGroupRef | SidebarTabRef | DocumentListPresetRef | SearchCategory): boolean { if (action?.rules?.visible) { + if (Array.isArray(action.rules.visible)) { + return action.rules.visible.every((rule) => this.extensions.evaluateRule(rule, this)); + } return this.extensions.evaluateRule(action.rules.visible, this); } return true;