[ACS-6445] Address #PT20471_7 Missing Access Control (#3627)

This commit is contained in:
Mykyta Maliarchuk
2024-02-05 14:59:07 +01:00
committed by GitHub
parent 4393f337c5
commit bcb7e634d9
4 changed files with 45 additions and 8 deletions

View File

@@ -554,7 +554,7 @@ export const canShowLogout = (context: AcaRuleContext): boolean => !context.with
* @param context Rule execution context
*/
export const isLibraryManager = (context: RuleContext): boolean =>
hasLibrarySelected(context) && context.selection.library?.entry.role === 'SiteManager';
hasLibrarySelected(context) && (context.selection.library?.entry.role === 'SiteManager' || isAdmin(context));
/**
* Checks if the preview button for search results can be showed