1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

Move remaining OrganizationAuth files to AC Team code ownership (#3382)

This commit is contained in:
Thomas Rittson
2023-11-02 01:14:40 +10:00
committed by GitHub
parent 34a3d4a4df
commit 1fb5e49a05
4 changed files with 5 additions and 5 deletions

View File

@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities;
namespace Bit.Api.AdminConsole.Models.Request;
public class AdminAuthRequestUpdateRequestModel
{
[EncryptedString]
public string EncryptedUserKey { get; set; }
[Required]
public bool RequestApproved { get; set; }
}

View File

@ -0,0 +1,6 @@
namespace Bit.Api.AdminConsole.Models.Request;
public class BulkDenyAdminAuthRequestRequestModel
{
public IEnumerable<Guid> Ids { get; set; }
}

View File

@ -0,0 +1,38 @@
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using Bit.Core.Auth.Models.Data;
using Bit.Core.Models.Api;
namespace Bit.Api.AdminConsole.Models.Response;
public class PendingOrganizationAuthRequestResponseModel : ResponseModel
{
public PendingOrganizationAuthRequestResponseModel(OrganizationAdminAuthRequest authRequest, string obj = "pending-org-auth-request") : base(obj)
{
if (authRequest == null)
{
throw new ArgumentNullException(nameof(authRequest));
}
Id = authRequest.Id;
UserId = authRequest.UserId;
OrganizationUserId = authRequest.OrganizationUserId;
Email = authRequest.Email;
PublicKey = authRequest.PublicKey;
RequestDeviceIdentifier = authRequest.RequestDeviceIdentifier;
RequestDeviceType = authRequest.RequestDeviceType.GetType().GetMember(authRequest.RequestDeviceType.ToString())
.FirstOrDefault()?.GetCustomAttribute<DisplayAttribute>()?.GetName();
RequestIpAddress = authRequest.RequestIpAddress;
CreationDate = authRequest.CreationDate;
}
public Guid Id { get; set; }
public Guid UserId { get; set; }
public Guid OrganizationUserId { get; set; }
public string Email { get; set; }
public string PublicKey { get; set; }
public string RequestDeviceIdentifier { get; set; }
public string RequestDeviceType { get; set; }
public string RequestIpAddress { get; set; }
public DateTime CreationDate { get; set; }
}