From f2e3173eebd1c4eabe7d424c29ea9b2f9ae0aa17 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 19 Oct 2023 13:36:49 +0200 Subject: [PATCH] Legacy: add fix for fs-userbadge --- src/Logic/State/FeatureSwitchState.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Logic/State/FeatureSwitchState.ts b/src/Logic/State/FeatureSwitchState.ts index a12835fbb..2c1700c50 100644 --- a/src/Logic/State/FeatureSwitchState.ts +++ b/src/Logic/State/FeatureSwitchState.ts @@ -75,6 +75,13 @@ export default class FeatureSwitchState extends OsmConnectionFeatureSwitches { layoutToUse?.enableUserBadge ?? true, "Disables/Enables logging in and thus disables editing all together. This effectively puts MapComplete into read-only mode." ) + { + if(QueryParameters.wasInitialized("fs-userbadge")){ + // userbadge is the legacy name for 'enable-login' + this.featureSwitchEnableLogin.setData(QueryParameters.GetBooleanQueryParameter("fs-userbadge", undefined, "Legacy").data) + } + } + this.featureSwitchSearch = FeatureSwitchUtils.initSwitch( "fs-search", layoutToUse?.enableSearch ?? true,