1
0
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:
Oscar Hinton
2021-12-16 15:35:09 +01:00
committed by GitHub
parent 61dc65aa59
commit 23b0a1f9df
531 changed files with 3024 additions and 3000 deletions

View File

@ -12,7 +12,7 @@ namespace Bit.Api.Models
FileName = data.FileName;
Key = data.Key;
}
[EncryptedStringLength(1000)]
public string FileName { get; set; }
[EncryptedStringLength(1000)]

View File

@ -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;

View File

@ -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))
{

View File

@ -1,4 +1,4 @@
namespace Bit.Api.Models.Request
namespace Bit.Api.Models.Request
{
public class AttachmentRequestModel
{

View File

@ -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))

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
using Bit.Core.Utilities;

View File

@ -37,7 +37,7 @@ namespace Bit.Api.Models.Request.Organizations
public class SsoConfigurationDataRequest : IValidatableObject
{
public SsoConfigurationDataRequest() {}
public SsoConfigurationDataRequest() { }
[Required]
public SsoType ConfigType { get; set; }

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Models.Request.Organizations
{

View File

@ -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; }

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using Bit.Api.Models.Request.Organizations;
using Bit.Core.Utilities;

View File

@ -1,4 +1,4 @@
using Bit.Core.Enums;
using Bit.Core.Enums;
using Bit.Core.Models.Api;
namespace Bit.Api.Models.Response

View File

@ -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; }
}

View File

@ -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; }
}

View File

@ -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; }
}

View File

@ -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; }

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Enums;
using Bit.Core.Models.Api;
using Bit.Core.Models.StaticStore;

View File

@ -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);

View File

@ -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; }
}
}

View File

@ -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; }

View File

@ -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)

View File

@ -1,4 +1,4 @@
using Bit.Core.Models.Api;
using Bit.Core.Models.Api;
namespace Bit.Api.Models.Response
{

View File

@ -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; }

View File

@ -1,4 +1,4 @@
using System;
using System;
using Bit.Core.Models.Api;
using Bit.Core.Models.Table;