mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Run dotnet format (#1764)
This commit is contained in:
@ -12,7 +12,7 @@ namespace Bit.Api.Models
|
||||
FileName = data.FileName;
|
||||
Key = data.Key;
|
||||
}
|
||||
|
||||
|
||||
[EncryptedStringLength(1000)]
|
||||
public string FileName { get; set; }
|
||||
[EncryptedStringLength(1000)]
|
||||
|
@ -16,7 +16,7 @@ namespace Bit.Api.Models.Public
|
||||
{
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
|
||||
Type = user.Type;
|
||||
AccessAll = user.AccessAll;
|
||||
ExternalId = user.ExternalId;
|
||||
@ -29,7 +29,7 @@ namespace Bit.Api.Models.Public
|
||||
{
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
|
||||
Type = user.Type;
|
||||
AccessAll = user.AccessAll;
|
||||
ExternalId = user.ExternalId;
|
||||
|
@ -9,7 +9,7 @@ namespace Bit.Api.Models.Request.Accounts
|
||||
public string Country { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
|
||||
public virtual IEnumerable<ValidationResult> Validate (ValidationContext validationContext)
|
||||
public virtual IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (Country == "US" && string.IsNullOrWhiteSpace(PostalCode))
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Bit.Api.Models.Request
|
||||
namespace Bit.Api.Models.Request
|
||||
{
|
||||
public class AttachmentRequestModel
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace Bit.Api.Models.Request.Organizations
|
||||
public string PublicKey { get; set; }
|
||||
[Required]
|
||||
public string EncryptedPrivateKey { get; set; }
|
||||
|
||||
|
||||
public OrganizationSignup ToOrganizationSignup(OrganizationSignup existingSignup)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(existingSignup.PublicKey))
|
||||
@ -25,7 +25,7 @@ namespace Bit.Api.Models.Request.Organizations
|
||||
|
||||
return existingSignup;
|
||||
}
|
||||
|
||||
|
||||
public OrganizationUpgrade ToOrganizationUpgrade(OrganizationUpgrade existingUpgrade)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(existingUpgrade.PublicKey))
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace Bit.Api.Models.Request.Organizations
|
||||
|
||||
public class SsoConfigurationDataRequest : IValidatableObject
|
||||
{
|
||||
public SsoConfigurationDataRequest() {}
|
||||
public SsoConfigurationDataRequest() { }
|
||||
|
||||
[Required]
|
||||
public SsoType ConfigType { get; set; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Api.Models.Request.Organizations
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ namespace Bit.Api.Models.Request.Organizations
|
||||
[Required]
|
||||
public IEnumerable<string> GroupIds { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class OrganizationUserResetPasswordEnrollmentRequestModel
|
||||
{
|
||||
public string ResetPasswordKey { get; set; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Api.Models.Request.Organizations;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.Models.Response
|
||||
|
@ -114,7 +114,7 @@ namespace Bit.Api.Models.Response
|
||||
KeyEncrypted = emergencyAccess.KeyEncrypted;
|
||||
Ciphers = ciphers.Select(c => new CipherResponseModel(c, globalSettings));
|
||||
}
|
||||
|
||||
|
||||
public string KeyEncrypted { get; set; }
|
||||
public IEnumerable<CipherResponseModel> Ciphers { get; set; }
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.Models.Response
|
||||
@ -10,7 +10,7 @@ namespace Bit.Api.Models.Response
|
||||
Id = orgId.ToString();
|
||||
ResetPasswordEnabled = resetPasswordEnabled;
|
||||
}
|
||||
|
||||
|
||||
public string Id { get; set; }
|
||||
public bool ResetPasswordEnabled { get; set; }
|
||||
}
|
||||
|
@ -12,11 +12,11 @@ namespace Bit.Api.Models.Response
|
||||
{
|
||||
throw new ArgumentNullException(nameof(org));
|
||||
}
|
||||
|
||||
|
||||
PublicKey = org.PublicKey;
|
||||
PrivateKey = org.PrivateKey;
|
||||
}
|
||||
|
||||
|
||||
public string PublicKey { get; set; }
|
||||
public string PrivateKey { get; set; }
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ namespace Bit.Api.Models.Response
|
||||
ResetPasswordKey = orgUser.ResetPasswordKey;
|
||||
EncryptedPrivateKey = orgUser.EncryptedPrivateKey;
|
||||
}
|
||||
|
||||
|
||||
public KdfType Kdf { get; set; }
|
||||
public int KdfIterations { get; set; }
|
||||
public string ResetPasswordKey { get; set; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Models.StaticStore;
|
||||
|
@ -7,7 +7,7 @@ namespace Bit.Api.Models.Response
|
||||
{
|
||||
public class ProfileOrganizationResponseModel : ResponseModel
|
||||
{
|
||||
public ProfileOrganizationResponseModel(string str) : base(str) {}
|
||||
public ProfileOrganizationResponseModel(string str) : base(str) { }
|
||||
|
||||
public ProfileOrganizationResponseModel(OrganizationUserOrganizationDetails organization) : this("profileOrganization")
|
||||
{
|
||||
@ -45,7 +45,7 @@ namespace Bit.Api.Models.Response
|
||||
StaticStore.GetSponsoredPlan(PlanSponsorshipType.FamiliesForEnterprise)
|
||||
.UsersCanSponsor(organization);
|
||||
PlanProductType = StaticStore.GetPlan(organization.PlanType).Product;
|
||||
|
||||
|
||||
if (organization.SsoConfig != null)
|
||||
{
|
||||
var ssoConfigData = SsoConfigurationData.Deserialize(organization.SsoConfig);
|
||||
|
@ -14,7 +14,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
{
|
||||
throw new ArgumentNullException(nameof(providerOrganization));
|
||||
}
|
||||
|
||||
|
||||
Id = providerOrganization.Id;
|
||||
ProviderId = providerOrganization.ProviderId;
|
||||
OrganizationId = providerOrganization.OrganizationId;
|
||||
@ -31,7 +31,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
{
|
||||
throw new ArgumentNullException(nameof(providerOrganization));
|
||||
}
|
||||
|
||||
|
||||
Id = providerOrganization.Id;
|
||||
ProviderId = providerOrganization.ProviderId;
|
||||
OrganizationId = providerOrganization.OrganizationId;
|
||||
@ -40,7 +40,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
CreationDate = providerOrganization.CreationDate;
|
||||
RevisionDate = providerOrganization.RevisionDate;
|
||||
}
|
||||
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProviderId { get; set; }
|
||||
public Guid OrganizationId { get; set; }
|
||||
@ -49,7 +49,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
public DateTime CreationDate { get; set; }
|
||||
public DateTime RevisionDate { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ProviderOrganizationOrganizationDetailsResponseModel : ProviderOrganizationResponseModel
|
||||
{
|
||||
public ProviderOrganizationOrganizationDetailsResponseModel(ProviderOrganizationOrganizationDetails providerOrganization,
|
||||
@ -62,7 +62,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
|
||||
OrganizationName = providerOrganization.OrganizationName;
|
||||
}
|
||||
|
||||
|
||||
public string OrganizationName { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
BusinessTaxNumber = provider.BusinessTaxNumber;
|
||||
BillingEmail = provider.BillingEmail;
|
||||
}
|
||||
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string BusinessName { get; set; }
|
||||
|
@ -23,7 +23,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
Status = providerUser.Status;
|
||||
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(providerUser.Permissions);
|
||||
}
|
||||
|
||||
|
||||
public ProviderUserResponseModel(ProviderUserUserDetails providerUser, string obj = "providerUser")
|
||||
: base(obj)
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace Bit.Api.Models.Response.Providers
|
||||
|
||||
public class ProviderUserUserDetailsResponseModel : ProviderUserResponseModel
|
||||
{
|
||||
public ProviderUserUserDetailsResponseModel(ProviderUserUserDetails providerUser,
|
||||
public ProviderUserUserDetailsResponseModel(ProviderUserUserDetails providerUser,
|
||||
string obj = "providerUserUserDetails") : base(providerUser, obj)
|
||||
{
|
||||
if (providerUser == null)
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.Models.Response
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.Models.Response
|
||||
@ -6,7 +6,7 @@ namespace Bit.Api.Models.Response
|
||||
public class SendFileUploadDataResponseModel : ResponseModel
|
||||
{
|
||||
public SendFileUploadDataResponseModel() : base("send-fileUpload") { }
|
||||
|
||||
|
||||
public string Url { get; set; }
|
||||
public FileUploadType FileUploadType { get; set; }
|
||||
public SendResponseModel SendResponse { get; set; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
|
Reference in New Issue
Block a user