mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-01 14:41:14 +00:00
make folderRules flag universal
This commit is contained in:
@@ -24,7 +24,11 @@
|
|||||||
|
|
||||||
import { AcaRuleContext, hasFolderSelected, canEditFolder, isNotFavorites } from '@alfresco/aca-shared/rules';
|
import { AcaRuleContext, hasFolderSelected, canEditFolder, isNotFavorites } from '@alfresco/aca-shared/rules';
|
||||||
|
|
||||||
export const isFolderRulesEnabled = (context: AcaRuleContext) => context.appConfig.get<string>('plugins.folderRules', 'false') === 'true';
|
export const isFolderRulesEnabled = (context: AcaRuleContext) => {
|
||||||
|
const flag = context.appConfig.get<boolean | string>('plugins.folderRules');
|
||||||
|
return flag === true || flag === 'true';
|
||||||
|
};
|
||||||
|
|
||||||
export const isFolderRulesAllowed = (context: AcaRuleContext) =>
|
export const isFolderRulesAllowed = (context: AcaRuleContext) =>
|
||||||
isFolderRulesEnabled(context) && canEditFolder(context) && hasFolderSelected(context) && isNotFavorites(context);
|
isFolderRulesEnabled(context) && canEditFolder(context) && hasFolderSelected(context) && isNotFavorites(context);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user