mirror of
https://github.com/bitwarden/server
synced 2025-12-13 14:53:34 +00:00
chore(feature-flag): [PM-19665] Remove web-push feature flag
* Remove storage-reseed feature flag * Remove web-push feature flag. * Removed check for web push enabled. * Linting
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
// FIXME: Update this file to be null safe and then delete the line below
|
// FIXME: Update this file to be null safe and then delete the line below
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using Bit.Core;
|
|
||||||
using Bit.Core.Enums;
|
using Bit.Core.Enums;
|
||||||
using Bit.Core.Models.Api;
|
using Bit.Core.Models.Api;
|
||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
@@ -46,8 +45,7 @@ public class ConfigResponseModel : ResponseModel
|
|||||||
Sso = globalSettings.BaseServiceUri.Sso
|
Sso = globalSettings.BaseServiceUri.Sso
|
||||||
};
|
};
|
||||||
FeatureStates = featureService.GetAll();
|
FeatureStates = featureService.GetAll();
|
||||||
var webPushEnabled = FeatureStates.TryGetValue(FeatureFlagKeys.WebPush, out var webPushEnabledValue) ? (bool)webPushEnabledValue : false;
|
Push = PushSettings.Build(globalSettings);
|
||||||
Push = PushSettings.Build(webPushEnabled, globalSettings);
|
|
||||||
Settings = new ServerSettingsResponseModel
|
Settings = new ServerSettingsResponseModel
|
||||||
{
|
{
|
||||||
DisableUserRegistration = globalSettings.DisableUserRegistration
|
DisableUserRegistration = globalSettings.DisableUserRegistration
|
||||||
@@ -76,9 +74,9 @@ public class PushSettings
|
|||||||
public PushTechnologyType PushTechnology { get; private init; }
|
public PushTechnologyType PushTechnology { get; private init; }
|
||||||
public string VapidPublicKey { get; private init; }
|
public string VapidPublicKey { get; private init; }
|
||||||
|
|
||||||
public static PushSettings Build(bool webPushEnabled, IGlobalSettings globalSettings)
|
public static PushSettings Build(IGlobalSettings globalSettings)
|
||||||
{
|
{
|
||||||
var vapidPublicKey = webPushEnabled ? globalSettings.WebPush.VapidPublicKey : null;
|
var vapidPublicKey = globalSettings.WebPush.VapidPublicKey;
|
||||||
var pushTechnology = vapidPublicKey != null ? PushTechnologyType.WebPush : PushTechnologyType.SignalR;
|
var pushTechnology = vapidPublicKey != null ? PushTechnologyType.WebPush : PushTechnologyType.SignalR;
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ public static class FeatureFlagKeys
|
|||||||
|
|
||||||
/* Platform Team */
|
/* Platform Team */
|
||||||
public const string PersistPopupView = "persist-popup-view";
|
public const string PersistPopupView = "persist-popup-view";
|
||||||
public const string WebPush = "web-push";
|
|
||||||
public const string IpcChannelFramework = "ipc-channel-framework";
|
public const string IpcChannelFramework = "ipc-channel-framework";
|
||||||
public const string PushNotificationsWhenLocked = "pm-19388-push-notifications-when-locked";
|
public const string PushNotificationsWhenLocked = "pm-19388-push-notifications-when-locked";
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,6 @@ public abstract class WebApplicationFactoryBase<T> : WebApplicationFactory<T>
|
|||||||
|
|
||||||
// Web push notifications
|
// Web push notifications
|
||||||
{ "globalSettings:webPush:vapidPublicKey", "BGBtAM0bU3b5jsB14IjBYarvJZ6rWHilASLudTTYDDBi7a-3kebo24Yus_xYeOMZ863flAXhFAbkL6GVSrxgErg" },
|
{ "globalSettings:webPush:vapidPublicKey", "BGBtAM0bU3b5jsB14IjBYarvJZ6rWHilASLudTTYDDBi7a-3kebo24Yus_xYeOMZ863flAXhFAbkL6GVSrxgErg" },
|
||||||
{ "globalSettings:launchDarkly:flagValues:web-push", "true" },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Some database drivers modify the connection string
|
// Some database drivers modify the connection string
|
||||||
|
|||||||
Reference in New Issue
Block a user