[ACS-9980] Add the option to provide custom user profile sections (#4859)

* [ACS-9980] Add the option to provide custom user profile sections

* [ACS-9980] Cr fixes

* [ACS-9980] Formatting fix
This commit is contained in:
MichalKinas
2025-10-23 13:49:02 +02:00
committed by GitHub
parent 2d8354b970
commit 24b2b23afd
12 changed files with 323 additions and 161 deletions
@@ -1196,6 +1196,18 @@ describe('app.evaluators', () => {
expect(app.isSmartFolder(context)).toBeTrue();
});
});
describe('isSSOEnabled', () => {
it('should return true if sso is enabled', () => {
context.appConfig = { get: () => 'OAUTH' } as any;
expect(app.isSSOEnabled(context)).toBe(true);
});
it('should return false if sso is not enabled', () => {
context.appConfig = { get: () => 'basic' } as any;
expect(app.isSSOEnabled(context)).toBe(false);
});
});
});
describe('Versions compatibility', () => {
@@ -560,3 +560,5 @@ export const canDisplayKnowledgeRetrievalButton = (context: AcaRuleContext): boo
navigation.isRecentFiles(context) ||
navigation.isFavorites(context) ||
((navigation.isSearchResults(context) || navigation.isLibraryContent(context)) && !navigation.isLibraries(context)));
export const isSSOEnabled = (context: AcaRuleContext): boolean => context.appConfig.get('authType') === 'OAUTH';