diff --git a/src/core/features/reportbuilder/services/handlers/reportbuilder.ts b/src/core/features/reportbuilder/services/handlers/reportbuilder.ts index e5109ea97..af8d9afa0 100644 --- a/src/core/features/reportbuilder/services/handlers/reportbuilder.ts +++ b/src/core/features/reportbuilder/services/handlers/reportbuilder.ts @@ -17,6 +17,7 @@ import { CoreUserProfileHandlerType, CoreUserProfileHandler, CoreUserProfileHandlerData, + CoreUserDelegateContext, } from '@features/user/services/user-delegate'; import { CoreNavigator } from '@services/navigator'; import { makeSingleton } from '@singletons'; @@ -42,6 +43,18 @@ export class CoreReportBuilderHandlerService implements CoreUserProfileHandler { return await CoreReportBuilder.isEnabled(); } + /** + * @inheritdoc + */ + async isEnabledForContext(context: CoreUserDelegateContext): Promise { + // Custom reports only available in user menu. + if (context !== CoreUserDelegateContext.USER_MENU) { + return false; + } + + return this.isEnabled(); + } + /** * @inheritdoc */