mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
org totp and storage flags
This commit is contained in:
@ -48,11 +48,13 @@ namespace Bit.Core.Models.Api
|
||||
FolderId = cipher.FolderId?.ToString();
|
||||
Favorite = cipher.Favorite;
|
||||
Edit = cipher.Edit;
|
||||
OrganizationUseTotp = cipher.OrganizationUseTotp;
|
||||
}
|
||||
|
||||
public string FolderId { get; set; }
|
||||
public bool Favorite { get; set; }
|
||||
public bool Edit { get; set; }
|
||||
public bool OrganizationUseTotp { get; set; }
|
||||
}
|
||||
|
||||
public class CipherDetailsResponseModel : CipherResponseModel
|
||||
|
@ -7,7 +7,7 @@ namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class LoginResponseModel : ResponseModel
|
||||
{
|
||||
public LoginResponseModel(Cipher cipher, GlobalSettings globalSettings, string obj = "login")
|
||||
public LoginResponseModel(Cipher cipher, GlobalSettings globalSettings, bool orgUseTotp, string obj = "login")
|
||||
: base(obj)
|
||||
{
|
||||
if(cipher == null)
|
||||
@ -32,11 +32,12 @@ namespace Bit.Core.Models.Api
|
||||
Totp = data.Totp;
|
||||
RevisionDate = cipher.RevisionDate;
|
||||
Edit = true;
|
||||
OrganizationUseTotp = orgUseTotp;
|
||||
Attachments = AttachmentResponseModel.FromCipher(cipher, globalSettings);
|
||||
}
|
||||
|
||||
public LoginResponseModel(CipherDetails cipher, GlobalSettings globalSettings, string obj = "login")
|
||||
: this(cipher as Cipher, globalSettings, obj)
|
||||
: this(cipher as Cipher, globalSettings, cipher.OrganizationUseTotp, obj)
|
||||
{
|
||||
FolderId = cipher.FolderId?.ToString();
|
||||
Favorite = cipher.Favorite;
|
||||
@ -48,6 +49,7 @@ namespace Bit.Core.Models.Api
|
||||
public string FolderId { get; set; }
|
||||
public bool Favorite { get; set; }
|
||||
public bool Edit { get; set; }
|
||||
public bool OrganizationUseTotp { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Uri { get; set; }
|
||||
public string Username { get; set; }
|
||||
|
@ -12,8 +12,10 @@ namespace Bit.Core.Models.Api
|
||||
Name = organization.Name;
|
||||
UseGroups = organization.UseGroups;
|
||||
UseDirectory = organization.UseDirectory;
|
||||
UseTotp = organization.UseTotp;
|
||||
Seats = organization.Seats;
|
||||
MaxCollections = organization.MaxCollections;
|
||||
MaxStorageGb = organization.MaxStorageGb;
|
||||
Key = organization.Key;
|
||||
Status = organization.Status;
|
||||
Type = organization.Type;
|
||||
@ -24,8 +26,10 @@ namespace Bit.Core.Models.Api
|
||||
public string Name { get; set; }
|
||||
public bool UseGroups { get; set; }
|
||||
public bool UseDirectory { get; set; }
|
||||
public bool UseTotp { get; set; }
|
||||
public int Seats { get; set; }
|
||||
public int MaxCollections { get; set; }
|
||||
public short? MaxStorageGb { get; set; }
|
||||
public string Key { get; set; }
|
||||
public OrganizationUserStatusType Status { get; set; }
|
||||
public OrganizationUserType Type { get; set; }
|
||||
|
@ -8,5 +8,6 @@ namespace Core.Models.Data
|
||||
public Guid? FolderId { get; set; }
|
||||
public bool Favorite { get; set; }
|
||||
public bool Edit { get; set; }
|
||||
public bool OrganizationUseTotp { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,10 @@ namespace Bit.Core.Models.Data
|
||||
public string Name { get; set; }
|
||||
public bool UseGroups { get; set; }
|
||||
public bool UseDirectory { get; set; }
|
||||
public bool UseTotp { get; set; }
|
||||
public int Seats { get; set; }
|
||||
public int MaxCollections { get; set; }
|
||||
public short? MaxStorageGb { get; set; }
|
||||
public string Key { get; set; }
|
||||
public Enums.OrganizationUserStatusType Status { get; set; }
|
||||
public Enums.OrganizationUserType Type { get; set; }
|
||||
|
@ -13,6 +13,8 @@ namespace Bit.Core.Models.StaticStore
|
||||
public short? MaxAdditionalSeats { get; set; }
|
||||
public bool UseGroups { get; set; }
|
||||
public bool UseDirectory { get; set; }
|
||||
public bool UseTotp { get; set; }
|
||||
public short? MaxStorageGb { get; set; }
|
||||
public decimal BasePrice { get; set; }
|
||||
public decimal SeatPrice { get; set; }
|
||||
public short? MaxCollections { get; set; }
|
||||
|
@ -16,6 +16,7 @@ namespace Bit.Core.Models.Table
|
||||
public short? MaxCollections { get; set; }
|
||||
public bool UseGroups { get; set; }
|
||||
public bool UseDirectory { get; set; }
|
||||
public bool UseTotp { get; set; }
|
||||
public long? Storage { get; set; }
|
||||
public short? MaxStorageGb { get; set; }
|
||||
public string StripeCustomerId { get; set; }
|
||||
|
Reference in New Issue
Block a user