mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-4644] Inherited & linked rules that are disabled should not be listed (#2843)
* [ACA-4644] Inherited & linked rules that are disabled should not be listed * Added condition for linked rule sets to need only enabled rules * Added a bypass for the empty rules list for linked rule sets that have only disabled rules * Replaced array filter with some
This commit is contained in:
@@ -143,7 +143,10 @@ export class FolderRuleSetsService {
|
||||
this.mainRuleSetSource.next(mainRuleSet);
|
||||
this.inheritedRuleSetsSource.next(inheritedRuleSets);
|
||||
this.hasMoreRuleSetsSource.next(this.hasMoreRuleSets);
|
||||
this.folderRulesService.selectRule(mainRuleSet?.rules[0] ?? inheritedRuleSets[0]?.rules[0] ?? null);
|
||||
const ruleToSelect =
|
||||
mainRuleSet?.rules.find((r: Rule) => FolderRuleSetsService.isOwnedRuleSet(mainRuleSet, nodeId) || r.isEnabled) ??
|
||||
inheritedRuleSets.reduce((foundRule: Rule, ruleSet: RuleSet) => foundRule ?? ruleSet.rules.find((r: Rule) => r.isEnabled), null);
|
||||
this.folderRulesService.selectRule(ruleToSelect);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user