Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS-8645][Legal Hold] ACA - context menu - hide unnecessary options #4064

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/aca-shared/rules/src/app.rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { RuleContext } from '@alfresco/adf-extensions';
import * as navigation from './navigation.rules';
import * as repository from './repository.rules';
import { isAdmin } from './user.rules';
import { NodeEntry } from '@alfresco/js-api/typings';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not have '/typings' in the import


/* cspell:disable */
export const supportedExtensions = {
Expand Down Expand Up @@ -483,6 +484,7 @@ export const canEditAspects = (context: RuleContext): boolean =>
!isMultiselection(context),
canUpdateSelectedNode(context),
!isWriteLocked(context),
!isNodeFrozen(context, context.selection.first),
navigation.isNotTrashcan(context),
repository.isMajorVersionAvailable(context, '7')
].every(Boolean);
Expand Down Expand Up @@ -629,3 +631,5 @@ export function isSmartFolder(context: RuleContext): boolean {
export const areTagsEnabled = (context: AcaRuleContext): boolean => context.appConfig.get('plugins.tagsEnabled', true);

export const areCategoriesEnabled = (context: AcaRuleContext): boolean => context.appConfig.get('plugins.categoriesEnabled', true);

export const isNodeFrozen = (_context: RuleContext, node: NodeEntry): boolean => !!node?.entry?.properties?.['rma:frozenAt'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This aspect should only be available from governance, this rule should not be placed in ACA

Loading