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

* [ACS-8694] Updated occurrences of visible in extensions.json to use arrays instead of single strings. Cleaned up rules in aca-content.module.ts

* [ACS-8694] Removed extra commas

* [ACS-8694] Broke down canDelete rule into seperate entities

* [ACS-8694] Fixed typo for notEmpty rule

* [ACS-8694] Fixed rule for edit offline

* [ACS-8694] Updated extension.schema.json

* [ACS-8694] Updated extension.schema.json

* [ACS-8694] Fixed rule for manage versions context menu item

* [ACS-8694] Fixed rule for manage versions and manage permissions

* [ACS-8694] Added rules.canManageFolderRules

* [ACS-8694] Fixed typo

* [ACS-8694] Updated visibility rules for folder rules and AOS plugin

* [ACS-8694] Updated extension.schema.json

* [ACS-8694] Updated existing rules to use !isTrashcan() instead of isNotTrashcan()

* [ACS-8694] folder-rules.plugin.json now uses arrays for controlling visibility

* [ACS-8694] Updated app.extensions.schema

* [ACS-8694] Removed unused rules

* [ACS-8694] Added unit tests for canToggleFileLock

* [ACS-8694] Added rules-list.md

* [ACS-8694] Revert unneeded project.json change

* [ACS-8694] Fixed toggleEditOffline rule

* [ACS-8694] Added migration guide (#4139)

* [ACS-8694] Added migration guide

* [ACS-8694] Fixed typo

* [ACS-8694] Added missing rule migration. Fixed incorrect rule migration. Fixed typos

* [ACS-8694] Code review finding - Replaced instance of any

* [ACS-8694] Code review finding - Updated rules.md. Removed duplication of rules list from rules-list.md. Added pointer to rules-list.md under tips section

* [ACS-8694] Fixed build issue

* [ACS-8694] Removed unneeded isNotDetails rule
This commit is contained in:
swapnil-verma-gl
2025-02-25 17:00:22 +05:30
committed by GitHub
parent 1dd00c9e4c
commit f1c4dcf45d
16 changed files with 907 additions and 1125 deletions

View File

@@ -163,74 +163,42 @@ export class ContentServiceExtensionModule {
});
extensions.setEvaluators({
canCopyNode: rules.canCopyNode,
canToggleJoinLibrary: rules.canToggleJoinLibrary,
canEditFolder: rules.canEditFolder,
isTrashcanItemSelected: rules.isTrashcanItemSelected,
canViewFile: rules.canViewFile,
canLeaveLibrary: rules.canLeaveLibrary,
canToggleSharedLink: rules.canToggleSharedLink,
canShowInfoDrawer: rules.canShowInfoDrawer,
canManageFileVersions: rules.canManageFileVersions,
canManagePermissions: rules.canManagePermissions,
canToggleEditOffline: rules.canToggleEditOffline,
canToggleFileLock: rules.canToggleFileLock,
canToggleFavorite: rules.canToggleFavorite,
isLibraryManager: rules.isLibraryManager,
canEditAspects: rules.canEditAspects,
canShowExpand: rules.canShowExpand,
canInfoPreview: rules.canInfoPreview,
isSmartFolder: rules.isSmartFolder,
isMultiSelection: rules.isMultiselection,
'app.selection.canDelete': rules.canDeleteSelection,
'app.selection.file.canUnlock': rules.canUnlockFile,
'app.selection.file.canLock': rules.canLockFile,
'app.selection.canDownload': rules.canDownloadSelection,
'app.selection.notEmpty': rules.hasSelection,
'app.selection.canUnshare': rules.canUnshareNodes,
'app.selection.canAddFavorite': rules.canAddFavorite,
'app.selection.canRemoveFavorite': rules.canRemoveFavorite,
'app.selection.first.canUpdate': rules.canUpdateSelectedNode,
'app.selection.file': rules.hasFileSelected,
'app.selection.file.canShare': rules.canShareFile,
'app.selection.file.isShared': rules.isShared,
'app.selection.file.isLocked': rules.hasLockedFiles,
'app.selection.file.isLockOwner': rules.isUserWriteLockOwner,
'app.selection.file.canUploadVersion': rules.canUploadVersion,
'app.selection.library': rules.hasLibrarySelected,
'app.selection.isPrivateLibrary': rules.isPrivateLibrary,
'app.selection.hasLibraryRole': rules.hasLibraryRole,
'app.selection.hasNoLibraryRole': rules.hasNoLibraryRole,
'app.selection.folder': rules.hasFolderSelected,
'app.selection.folder.canUpdate': rules.canUpdateSelectedFolder,
'app.selection.displayedKnowledgeRetrievalButton': rules.canDisplayKnowledgeRetrievalButton,
'app.navigation.folder.canCreate': rules.canCreateFolder,
'app.navigation.folder.canUpload': rules.canUpload,
'app.navigation.isTrashcan': rules.isTrashcan,
'app.navigation.isNotTrashcan': rules.isNotTrashcan,
'app.navigation.isLibraries': rules.isLibraries,
'app.navigation.isLibraryFiles': rules.isLibraryFiles,
'app.navigation.isPersonalFiles': rules.isPersonalFiles,
'app.navigation.isNotLibraries': rules.isNotLibraries,
'app.navigation.isSharedFiles': rules.isSharedFiles,
'app.navigation.isNotSharedFiles': rules.isNotSharedFiles,
'app.navigation.isFavorites': rules.isFavorites,
'app.navigation.isNotFavorites': rules.isNotFavorites,
'app.navigation.isRecentFiles': rules.isRecentFiles,
'app.navigation.isNotRecentFiles': rules.isNotRecentFiles,
'app.navigation.isSearchResults': rules.isSearchResults,
'app.navigation.isNotSearchResults': rules.isNotSearchResults,
'app.navigation.isPreview': rules.isPreview,
'app.navigation.isSharedPreview': rules.isSharedPreview,
'app.navigation.isFavoritesPreview': rules.isFavoritesPreview,
'app.navigation.isSharedFileViewer': rules.isSharedFileViewer,
'app.navigation.isNotDetails': rules.isNotDetails,
'app.navigation.isDetails': rules.isDetails,
'repository.isQuickShareEnabled': rules.hasQuickShareEnabled,
'user.isAdmin': rules.isAdmin,
'app.canShowLogout': rules.canShowLogout,
'app.isContentServiceEnabled': rules.isContentServiceEnabled,
'app.isUploadSupported': rules.isUploadSupported,
'app.canCreateLibrary': rules.canCreateLibrary,
'app.areTagsEnabled': rules.areTagsEnabled,
'app.areCategoriesEnabled': rules.areCategoriesEnabled
});