mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
chore(flag-removal): [Auth/PM20439] Remove Flagging Logic for BrowserExtensionLoginApproval (#6368)
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using Bit.Api.Auth.Models.Response;
|
using Bit.Api.Auth.Models.Response;
|
||||||
using Bit.Api.Models.Response;
|
using Bit.Api.Models.Response;
|
||||||
using Bit.Core;
|
|
||||||
using Bit.Core.Auth.Enums;
|
using Bit.Core.Auth.Enums;
|
||||||
using Bit.Core.Auth.Identity;
|
using Bit.Core.Auth.Identity;
|
||||||
using Bit.Core.Auth.Models.Api.Request.AuthRequest;
|
using Bit.Core.Auth.Models.Api.Request.AuthRequest;
|
||||||
@@ -12,7 +11,6 @@ using Bit.Core.Exceptions;
|
|||||||
using Bit.Core.Repositories;
|
using Bit.Core.Repositories;
|
||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
using Bit.Core.Settings;
|
using Bit.Core.Settings;
|
||||||
using Bit.Core.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
@@ -55,7 +53,6 @@ public class AuthRequestsController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("pending")]
|
[HttpGet("pending")]
|
||||||
[RequireFeature(FeatureFlagKeys.BrowserExtensionLoginApproval)]
|
|
||||||
public async Task<ListResponseModel<PendingAuthRequestResponseModel>> GetPendingAuthRequestsAsync()
|
public async Task<ListResponseModel<PendingAuthRequestResponseModel>> GetPendingAuthRequestsAsync()
|
||||||
{
|
{
|
||||||
var userId = _userService.GetProperUserId(User).Value;
|
var userId = _userService.GetProperUserId(User).Value;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using Bit.Core;
|
using Bit.Core.Enums;
|
||||||
using Bit.Core.Enums;
|
|
||||||
using Bit.Core.Services;
|
|
||||||
|
|
||||||
namespace Bit.Identity.Utilities;
|
namespace Bit.Identity.Utilities;
|
||||||
|
|
||||||
@@ -11,28 +9,15 @@ public interface ILoginApprovingClientTypes
|
|||||||
|
|
||||||
public class LoginApprovingClientTypes : ILoginApprovingClientTypes
|
public class LoginApprovingClientTypes : ILoginApprovingClientTypes
|
||||||
{
|
{
|
||||||
public LoginApprovingClientTypes(
|
public LoginApprovingClientTypes()
|
||||||
IFeatureService featureService)
|
|
||||||
{
|
{
|
||||||
if (featureService.IsEnabled(FeatureFlagKeys.BrowserExtensionLoginApproval))
|
TypesThatCanApprove = new List<ClientType>
|
||||||
{
|
{
|
||||||
TypesThatCanApprove = new List<ClientType>
|
ClientType.Desktop,
|
||||||
{
|
ClientType.Mobile,
|
||||||
ClientType.Desktop,
|
ClientType.Web,
|
||||||
ClientType.Mobile,
|
ClientType.Browser,
|
||||||
ClientType.Web,
|
};
|
||||||
ClientType.Browser,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TypesThatCanApprove = new List<ClientType>
|
|
||||||
{
|
|
||||||
ClientType.Desktop,
|
|
||||||
ClientType.Mobile,
|
|
||||||
ClientType.Web,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IReadOnlyCollection<ClientType> TypesThatCanApprove { get; }
|
public IReadOnlyCollection<ClientType> TypesThatCanApprove { get; }
|
||||||
|
|||||||
Reference in New Issue
Block a user