[ACS-8694] Re-introduce visibility rules cleanup (#4516)

* [ACS-8694] Cleanup of visibility rules for extensions in ACA (#4140)

* [ACS-9369] Resolved issues where visibility rules with a single element array would log errors (#4416)

* [ACS-9369] Resolved issues where visibility rules with a single element array would log errors

* [ACS-9369] Improved rule array filtering logic

* [ACS-9369] Added type to variable

(cherry picked from commit 4e33f1126d)

* [ACS-8694] Removed unneeded test cases

* [ACS-8694] Fixed 'Favorite' option showing up in toolbar when opening search page
This commit is contained in:
swapnil-verma-gl
2025-05-15 14:14:00 +05:30
committed by GitHub
parent 744ba8db68
commit 4357fe9c08
18 changed files with 935 additions and 1181 deletions

View File

@@ -22,10 +22,6 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { AcaRuleContext, canEditFolder, hasFolderSelected, isNotFavorites, isSmartFolder } from '@alfresco/aca-shared/rules';
import { AcaRuleContext } from '@alfresco/aca-shared/rules';
export const isFolderRulesEnabled = (context: AcaRuleContext) => context.appConfig.get<boolean>('plugins.folderRules', false);
export const isFolderRulesAllowed = (context: AcaRuleContext) =>
isFolderRulesEnabled(context) && canEditFolder(context) && hasFolderSelected(context) && isNotFavorites(context) && !isSmartFolder(context);
export const canManageFolderRules = (context: AcaRuleContext): boolean => isFolderRulesAllowed(context);