From de28040df2bbada65616ff68056a89ce64b82b8a Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Tue, 22 Nov 2022 17:26:14 +0100 Subject: [PATCH] MOBILE-4059 user: Fix disabled support for guests --- .../features/user/classes/support/guest-support-config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/features/user/classes/support/guest-support-config.ts b/src/core/features/user/classes/support/guest-support-config.ts index 2c4462478..bfc921e12 100644 --- a/src/core/features/user/classes/support/guest-support-config.ts +++ b/src/core/features/user/classes/support/guest-support-config.ts @@ -13,6 +13,7 @@ // limitations under the License. import { CoreSiteConfigSupportAvailability, CoreSitePublicConfigResponse } from '@classes/site'; +import { CoreLoginHelper } from '@features/login/services/login-helper'; import { CoreUserNullSupportConfig } from '@features/user/classes/support/null-support-config'; import { CoreSites } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; @@ -51,6 +52,10 @@ export class CoreUserGuestSupportConfig extends CoreUserSupportConfig { * @inheritdoc */ canContactSupport(): boolean { + if (CoreLoginHelper.isFeatureDisabled('NoDelegate_CoreUserSupport', this.config)) { + return false; + } + // This config was introduced in 4.1, if it's missing we can assume the site is 4.0 or lower. if ('supportavailability' in this.config) { return this.config.supportavailability === CoreSiteConfigSupportAvailability.Anyone;