1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00

[AC-1284] AC Team code ownership moves - Provider (#3359)

This commit is contained in:
Thomas Rittson 2023-10-27 03:38:29 +10:00 committed by GitHub
parent c8bcc32764
commit 26dd8b0e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
115 changed files with 325 additions and 252 deletions

View File

@ -1,11 +1,12 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Providers.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Exceptions;
using Bit.Core.Providers.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;
namespace Bit.Commercial.Core.Providers;
namespace Bit.Commercial.Core.AdminConsole.Providers;
public class CreateProviderCommand : ICreateProviderCommand
{

View File

@ -1,11 +1,13 @@
using Bit.Core.Context;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Business.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Business.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.Services;
@ -13,7 +15,7 @@ using Bit.Core.Settings;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.DataProtection;
namespace Bit.Commercial.Core.Services;
namespace Bit.Commercial.Core.AdminConsole.Services;
public class ProviderService : IProviderService
{

View File

@ -1,7 +1,7 @@
using Bit.Commercial.Core.Providers;
using Bit.Commercial.Core.Services;
using Bit.Core.Providers.Interfaces;
using Bit.Core.Services;
using Bit.Commercial.Core.AdminConsole.Providers;
using Bit.Commercial.Core.AdminConsole.Services;
using Bit.Core.AdminConsole.Providers.Interfaces;
using Bit.Core.AdminConsole.Services;
using Microsoft.Extensions.DependencyInjection;
namespace Bit.Commercial.Core.Utilities;

View File

@ -1,9 +1,9 @@
using System.Reflection;
using AutoFixture;
using AutoFixture.Xunit2;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
namespace Bit.Commercial.Core.Test.AutoFixture;
namespace Bit.Commercial.Core.Test.AdminConsole.AutoFixture;
internal class ProviderUser : ICustomization
{
@ -18,7 +18,7 @@ internal class ProviderUser : ICustomization
public void Customize(IFixture fixture)
{
fixture.Customize<Bit.Core.Entities.Provider.ProviderUser>(composer => composer
fixture.Customize<Bit.Core.AdminConsole.Entities.Provider.ProviderUser>(composer => composer
.With(o => o.Type, Type)
.With(o => o.Status, Status));
}

View File

@ -1,16 +1,17 @@
using Bit.Commercial.Core.Providers;
using Bit.Commercial.Core.AdminConsole.Providers;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
using NSubstitute;
using Xunit;
namespace Bit.Commercial.Core.Test.ProviderFeatures;
namespace Bit.Commercial.Core.Test.AdminConsole.ProviderFeatures;
[SutProviderCustomize]
public class CreateProviderCommandTests

View File

@ -1,13 +1,14 @@
using Bit.Commercial.Core.Services;
using Bit.Commercial.Core.Test.AutoFixture;
using Bit.Commercial.Core.AdminConsole.Services;
using Bit.Commercial.Core.Test.AdminConsole.AutoFixture;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Business.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Business.Provider;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Utilities;
@ -17,10 +18,10 @@ using Microsoft.AspNetCore.DataProtection;
using NSubstitute;
using NSubstitute.ReturnsExtensions;
using Xunit;
using Provider = Bit.Core.Entities.Provider.Provider;
using ProviderUser = Bit.Core.Entities.Provider.ProviderUser;
using Provider = Bit.Core.AdminConsole.Entities.Provider.Provider;
using ProviderUser = Bit.Core.AdminConsole.Entities.Provider.ProviderUser;
namespace Bit.Commercial.Core.Test.Services;
namespace Bit.Commercial.Core.Test.AdminConsole.Services;
[SutProviderCustomize]
public class ProviderServiceTests

View File

@ -1,9 +1,11 @@
using Bit.Admin.Enums;
using Bit.Admin.Models;
using Bit.Admin.Utilities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.Providers.Interfaces;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Providers.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.SharedWeb.Utilities;
namespace Bit.Admin.Models;

View File

@ -1,9 +1,9 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Business;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
using Bit.Core.Settings;

View File

@ -1,6 +1,6 @@
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
using Bit.Core.Vault.Entities;

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
namespace Bit.Admin.Models;

View File

@ -1,6 +1,6 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
namespace Bit.Admin.Models;

View File

@ -1,4 +1,4 @@
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
namespace Bit.Admin.Models;

View File

@ -1,5 +1,5 @@
@using Bit.SharedWeb.Utilities
@model Bit.Core.Entities.Provider.Provider
@model Bit.Core.AdminConsole.Entities.Provider.Provider
<dl class="row">
<dt class="col-sm-4 col-lg-3">Provider Name</dt>
<dd class="col-sm-8 col-lg-9">@Model.Name</dd>

View File

@ -1,4 +1,5 @@
@using Bit.Admin.Enums;
@using Bit.Core.AdminConsole.Enums.Provider
@inject Bit.Admin.Services.IAccessControlService AccessControlService
@model ProviderViewModel

View File

@ -1,4 +1,5 @@
@using Bit.SharedWeb.Utilities
@using Bit.Core.AdminConsole.Enums.Provider
@model CreateProviderModel
@{
ViewData["Title"] = "Create Provider";

View File

@ -1,3 +1,4 @@
@using Bit.Core.AdminConsole.Enums.Provider
@model ProviderViewModel
@await Html.PartialAsync("_ProviderScripts")

View File

@ -1,4 +1,5 @@
@using Bit.SharedWeb.Utilities
@using Bit.Core.AdminConsole.Enums.Provider
@model ProviderViewModel
<dl class="row">
<dt class="col-sm-4 col-lg-3">Id</dt>

View File

@ -1,5 +1,6 @@
@using Bit.SharedWeb.Utilities
@using Bit.Admin.Enums;
@using Bit.Core.AdminConsole.Enums.Provider
@inject Bit.Admin.Services.IAccessControlService AccessControlService;
@model OrganizationEditModel

View File

@ -1,7 +1,6 @@
@using Microsoft.AspNetCore.Identity
@using Bit.Admin
@using Bit.Admin.Models
@using Bit.Core.Enums.Provider
@using Bit.Core.Enums
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper "*, Admin"

View File

@ -11,6 +11,7 @@ using Bit.Api.Models.Request.Accounts;
using Bit.Api.Models.Request.Organizations;
using Bit.Api.Models.Response;
using Bit.Core;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Repositories;
using Bit.Core.Auth.Services;

View File

@ -1,9 +1,10 @@
using Bit.Api.AdminConsole.Models.Request.Providers;
using Bit.Api.AdminConsole.Models.Response.Providers;
using Bit.Api.Models.Response;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.Authorization;

View File

@ -1,10 +1,11 @@
using Bit.Api.AdminConsole.Models.Request.Providers;
using Bit.Api.AdminConsole.Models.Response.Providers;
using Bit.Api.Models.Response;
using Bit.Core.AdminConsole.Models.Business.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business.Provider;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

View File

@ -1,8 +1,9 @@
using Bit.Api.AdminConsole.Models.Request.Providers;
using Bit.Api.AdminConsole.Models.Response.Providers;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Microsoft.AspNetCore.Authorization;

View File

@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
namespace Bit.Api.AdminConsole.Models.Request.Providers;

View File

@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Settings;
namespace Bit.Api.AdminConsole.Models.Request.Providers;

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Utilities;
namespace Bit.Api.AdminConsole.Models.Request.Providers;

View File

@ -1,7 +1,7 @@
using Bit.Core.Auth.Enums;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models.Data;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Api;
using Bit.Core.Models.Data;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;

View File

@ -1,4 +1,5 @@
using Bit.Core.Enums;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Utilities;

View File

@ -1,4 +1,5 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Models.Api;
using Bit.Core.Models.Data;
using Bit.Core.Utilities;

View File

@ -1,6 +1,6 @@
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Models.Api;
using Bit.Core.Models.Data;
namespace Bit.Api.AdminConsole.Models.Response.Providers;

View File

@ -1,4 +1,4 @@
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Models.Api;
namespace Bit.Api.AdminConsole.Models.Response.Providers;

View File

@ -1,5 +1,6 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Models.Api;
using Bit.Core.Models.Data;
using Bit.Core.Utilities;

View File

@ -5,12 +5,13 @@ using Bit.Api.Models.Request.Accounts;
using Bit.Api.Models.Response;
using Bit.Api.Utilities;
using Bit.Core;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Auth.Models.Api.Response.Accounts;
using Bit.Core.Auth.Services;
using Bit.Core.Auth.Utilities;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Api.Response;
using Bit.Core.Models.Business;

View File

@ -1,5 +1,6 @@
using Bit.Api.Models.Response;
using Bit.Api.Utilities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Exceptions;
using Bit.Core.Models.Data;

View File

@ -1,8 +1,8 @@
using Bit.Api.AdminConsole.Models.Response;
using Bit.Api.AdminConsole.Models.Response.Providers;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Entities;
using Bit.Core.Models.Api;
using Bit.Core.Models.Data;
using Bit.Core.Models.Data.Organizations.OrganizationUsers;
namespace Bit.Api.Models.Response;

View File

@ -5,7 +5,6 @@ using Bit.Core.Exceptions;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Utilities;
using Bit.Core.Vault.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@ -26,7 +25,6 @@ public class ImportCiphersController : Controller
ICollectionCipherRepository collectionCipherRepository,
ICipherService cipherService,
IUserService userService,
IProviderService providerService,
ICurrentContext currentContext,
ILogger<ImportCiphersController> logger,
GlobalSettings globalSettings)

View File

@ -6,6 +6,7 @@ using Bit.Api.Utilities;
using Bit.Api.Vault.Models.Request;
using Bit.Api.Vault.Models.Response;
using Bit.Core;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Exceptions;

View File

@ -1,7 +1,8 @@
using Bit.Api.Vault.Models.Response;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;

View File

@ -1,5 +1,6 @@
using Bit.Api.Models.Response;
using Bit.Api.Tools.Models.Response;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Entities;
using Bit.Core.Models.Api;
using Bit.Core.Models.Api.Response;

View File

@ -1,9 +1,9 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Utilities;
namespace Bit.Core.Context;
namespace Bit.Core.AdminConsole.Context;
public class CurrentContextProvider
{

View File

@ -1,7 +1,8 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Entities;
using Bit.Core.Utilities;
namespace Bit.Core.Entities.Provider;
namespace Bit.Core.AdminConsole.Entities.Provider;
public class Provider : ITableObject<Guid>
{

View File

@ -1,6 +1,7 @@
using Bit.Core.Utilities;
using Bit.Core.Entities;
using Bit.Core.Utilities;
namespace Bit.Core.Entities.Provider;
namespace Bit.Core.AdminConsole.Entities.Provider;
public class ProviderOrganization : ITableObject<Guid>
{

View File

@ -1,7 +1,8 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Entities;
using Bit.Core.Utilities;
namespace Bit.Core.Entities.Provider;
namespace Bit.Core.AdminConsole.Entities.Provider;
public class ProviderUser : ITableObject<Guid>
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Enums.Provider;
namespace Bit.Core.AdminConsole.Enums.Provider;
public enum ProviderStatusType : byte
{

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Bit.Core.Enums.Provider;
namespace Bit.Core.AdminConsole.Enums.Provider;
public enum ProviderType : byte
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Enums.Provider;
namespace Bit.Core.AdminConsole.Enums.Provider;
public enum ProviderUserStatusType : byte
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Enums.Provider;
namespace Bit.Core.AdminConsole.Enums.Provider;
public enum ProviderUserType : byte
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
namespace Bit.Core.Models.Business.Provider;
namespace Bit.Core.AdminConsole.Models.Business.Provider;
public class ProviderUserInvite<T>
{

View File

@ -1,12 +1,10 @@
using Bit.Core.Entities.Provider;
namespace Bit.Core.Models.Data;
namespace Bit.Core.AdminConsole.Models.Data.Provider;
public class ProviderAbility
{
public ProviderAbility() { }
public ProviderAbility(Provider provider)
public ProviderAbility(Entities.Provider.Provider provider)
{
Id = provider.Id;
UseEvents = provider.UseEvents;

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums;
namespace Bit.Core.Models.Data;
namespace Bit.Core.AdminConsole.Models.Data.Provider;
public class ProviderOrganizationOrganizationDetails
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
namespace Bit.Core.Models.Data;
namespace Bit.Core.AdminConsole.Models.Data.Provider;
public class ProviderOrganizationProviderDetails
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
namespace Bit.Core.Models.Data;
namespace Bit.Core.AdminConsole.Models.Data.Provider;
public class ProviderUserOrganizationDetails
{
@ -34,5 +34,5 @@ public class ProviderUserOrganizationDetails
public Guid? ProviderId { get; set; }
public Guid? ProviderUserId { get; set; }
public string ProviderName { get; set; }
public Enums.PlanType PlanType { get; set; }
public Core.Enums.PlanType PlanType { get; set; }
}

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
namespace Bit.Core.Models.Data;
namespace Bit.Core.AdminConsole.Models.Data.Provider;
public class ProviderUserProviderDetails
{

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Models.Data;
namespace Bit.Core.AdminConsole.Models.Data.Provider;
public class ProviderUserPublicKey
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
namespace Bit.Core.Models.Data;
namespace Bit.Core.AdminConsole.Models.Data.Provider;
public class ProviderUserUserDetails
{

View File

@ -1,6 +1,6 @@
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
namespace Bit.Core.Providers.Interfaces;
namespace Bit.Core.AdminConsole.Providers.Interfaces;
public interface ICreateProviderCommand
{

View File

@ -1,7 +1,8 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Repositories;
namespace Bit.Core.Repositories;
namespace Bit.Core.AdminConsole.Repositories;
public interface IProviderOrganizationRepository : IRepository<ProviderOrganization, Guid>
{

View File

@ -1,7 +1,8 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Repositories;
namespace Bit.Core.Repositories;
namespace Bit.Core.AdminConsole.Repositories;
public interface IProviderRepository : IRepository<Provider, Guid>
{

View File

@ -1,8 +1,9 @@
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Repositories;
namespace Bit.Core.Repositories;
namespace Bit.Core.AdminConsole.Repositories;
public interface IProviderUserRepository : IRepository<ProviderUser, Guid>
{

View File

@ -1,9 +1,9 @@
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Business.Provider;
using Bit.Core.Entities;
using Bit.Core.Models.Business;
using Bit.Core.Models.Business.Provider;
namespace Bit.Core.Services;
namespace Bit.Core.AdminConsole.Services;
public interface IProviderService
{

View File

@ -1,9 +1,9 @@
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Business.Provider;
using Bit.Core.Entities;
using Bit.Core.Models.Business;
using Bit.Core.Models.Business.Provider;
namespace Bit.Core.Services;
namespace Bit.Core.AdminConsole.Services.NoopImplementations;
public class NoopProviderService : IProviderService
{

View File

@ -1,7 +1,10 @@
using System.Security.Claims;
using Bit.Core.AdminConsole.Context;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Identity;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;

View File

@ -1,4 +1,6 @@
using System.Security.Claims;
using Bit.Core.AdminConsole.Context;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Identity;

View File

@ -1,4 +1,4 @@
using Bit.Core.Enums.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
namespace Bit.Core.Models.Data.Organizations.OrganizationUsers;

View File

@ -1,10 +1,10 @@
using Bit.Core.Entities;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.OrganizationFeatures.OrganizationSubscriptions.Interface;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Utilities;

View File

@ -1,6 +1,6 @@
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.Entities;
using Bit.Core.Models.Data.Organizations;
namespace Bit.Core.Services;

View File

@ -1,6 +1,6 @@
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.SecretsManager.Entities;
using Bit.Core.Vault.Entities;

View File

@ -1,7 +1,7 @@
using Bit.Core.Auth.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Business;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Mail;
namespace Bit.Core.Services;

View File

@ -1,7 +1,9 @@
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Models.Data.Organizations;

View File

@ -1,10 +1,10 @@
using System.Net;
using System.Reflection;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Business;
using Bit.Core.Auth.Models.Mail;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Mail;
using Bit.Core.Models.Mail.FamiliesForEnterprise;
using Bit.Core.Models.Mail.Provider;

View File

@ -1,6 +1,7 @@
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Models.Data.Organizations;
using Bit.Core.Repositories;

View File

@ -1,4 +1,5 @@
using Azure.Messaging.ServiceBus;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Repositories;

View File

@ -1,6 +1,7 @@
using System.Security.Claims;
using System.Text.Json;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Business;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Enums;
@ -9,7 +10,6 @@ using Bit.Core.Auth.Repositories;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Exceptions;
using Bit.Core.Models.Business;
using Bit.Core.Models.Data;

View File

@ -1,5 +1,6 @@
using System.Security.Claims;
using System.Text.Json;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models;
using Bit.Core.Context;

View File

@ -1,6 +1,6 @@
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums;
using Bit.Core.SecretsManager.Entities;
using Bit.Core.Vault.Entities;

View File

@ -1,7 +1,7 @@
using Bit.Core.Auth.Entities;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.Auth.Entities;
using Bit.Core.Auth.Models.Business;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Mail;
namespace Bit.Core.Services;

View File

@ -10,11 +10,12 @@ using Azure;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
using Azure.Storage.Queues.Models;
using Bit.Core.AdminConsole.Context;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Auth.Enums;
using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Identity;
using Bit.Core.Settings;
using IdentityModel;

View File

@ -1,5 +1,6 @@
using System.Collections.ObjectModel;
using System.Security.Claims;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Enums;
using Bit.Core.Identity;

View File

@ -1,4 +1,5 @@
using System.Security.Claims;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Identity;
using Bit.Core.Repositories;

View File

@ -1,12 +1,13 @@
using System.Data;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Settings;
using Bit.Infrastructure.Dapper.Repositories;
using Dapper;
using Microsoft.Data.SqlClient;
namespace Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Infrastructure.Dapper.AdminConsole.Repositories;
public class ProviderOrganizationRepository : Repository<ProviderOrganization, Guid>, IProviderOrganizationRepository
{

View File

@ -1,12 +1,13 @@
using System.Data;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Settings;
using Bit.Infrastructure.Dapper.Repositories;
using Dapper;
using Microsoft.Data.SqlClient;
namespace Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Infrastructure.Dapper.AdminConsole.Repositories;
public class ProviderRepository : Repository<Provider, Guid>, IProviderRepository
{

View File

@ -1,13 +1,14 @@
using System.Data;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Settings;
using Bit.Infrastructure.Dapper.Repositories;
using Dapper;
using Microsoft.Data.SqlClient;
namespace Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Infrastructure.Dapper.AdminConsole.Repositories;
public class ProviderUserRepository : Repository<ProviderUser, Guid>, IProviderUserRepository
{

View File

@ -0,0 +1,15 @@
using AutoMapper;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider;
public class Provider : Core.AdminConsole.Entities.Provider.Provider
{
}
public class ProviderMapperProfile : Profile
{
public ProviderMapperProfile()
{
CreateMap<Core.AdminConsole.Entities.Provider.Provider, Provider>().ReverseMap();
}
}

View File

@ -0,0 +1,18 @@
using AutoMapper;
using Bit.Infrastructure.EntityFramework.Models;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider;
public class ProviderOrganization : Core.AdminConsole.Entities.Provider.ProviderOrganization
{
public virtual Provider Provider { get; set; }
public virtual Organization Organization { get; set; }
}
public class ProviderOrganizationMapperProfile : Profile
{
public ProviderOrganizationMapperProfile()
{
CreateMap<Core.AdminConsole.Entities.Provider.ProviderOrganization, ProviderOrganization>().ReverseMap();
}
}

View File

@ -0,0 +1,18 @@
using AutoMapper;
using Bit.Infrastructure.EntityFramework.Models;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider;
public class ProviderUser : Core.AdminConsole.Entities.Provider.ProviderUser
{
public virtual User User { get; set; }
public virtual Provider Provider { get; set; }
}
public class ProviderUserMapperProfile : Profile
{
public ProviderUserMapperProfile()
{
CreateMap<Core.AdminConsole.Entities.Provider.ProviderUser, ProviderUser>().ReverseMap();
}
}

View File

@ -1,15 +1,16 @@
using AutoMapper;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
using Bit.Infrastructure.EntityFramework.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace Bit.Infrastructure.EntityFramework.Repositories;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
public class ProviderOrganizationRepository :
Repository<ProviderOrganization, Models.ProviderOrganization, Guid>, IProviderOrganizationRepository
Repository<ProviderOrganization, Models.Provider.ProviderOrganization, Guid>, IProviderOrganizationRepository
{
public ProviderOrganizationRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
: base(serviceScopeFactory, mapper, context => context.ProviderOrganizations)

View File

@ -1,13 +1,14 @@
using AutoMapper;
using Bit.Core.Entities.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace Bit.Infrastructure.EntityFramework.Repositories;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
public class ProviderRepository : Repository<Provider, Models.Provider, Guid>, IProviderRepository
public class ProviderRepository : Repository<Provider, Models.Provider.Provider, Guid>, IProviderRepository
{
public ProviderRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)

View File

@ -1,16 +1,18 @@
using AutoMapper;
using Bit.Core.Entities.Provider;
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Core.AdminConsole.Repositories;
using Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace Bit.Infrastructure.EntityFramework.Repositories;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
public class ProviderUserRepository :
Repository<ProviderUser, Models.ProviderUser, Guid>, IProviderUserRepository
Repository<ProviderUser, Models.Provider.ProviderUser, Guid>, IProviderUserRepository
{
public ProviderUserRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
: base(serviceScopeFactory, mapper, (DatabaseContext context) => context.ProviderUsers)

View File

@ -1,6 +1,8 @@
using Bit.Core.Entities.Provider;
using Bit.Core.AdminConsole.Entities.Provider;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
public class ProviderOrganizationCountByOrganizationIdsQuery : IQuery<ProviderOrganization>
{

View File

@ -1,6 +1,8 @@
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
public class ProviderOrganizationOrganizationDetailsReadByProviderIdQuery : IQuery<ProviderOrganizationOrganizationDetails>
{

View File

@ -1,6 +1,8 @@
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
public class ProviderOrganizationReadByUserIdQuery : IQuery<ProviderOrganizationProviderDetails>
{

View File

@ -1,6 +1,8 @@
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
public class ProviderUserOrganizationDetailsViewQuery : IQuery<ProviderUserOrganizationDetails>
{

View File

@ -1,7 +1,9 @@
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;
namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories.Queries;
public class ProviderUserProviderDetailsReadByUserIdStatusQuery : IQuery<ProviderUserProviderDetails>
{

View File

@ -1,15 +0,0 @@
using AutoMapper;
namespace Bit.Infrastructure.EntityFramework.Models;
public class Provider : Core.Entities.Provider.Provider
{
}
public class ProviderMapperProfile : Profile
{
public ProviderMapperProfile()
{
CreateMap<Core.Entities.Provider.Provider, Provider>().ReverseMap();
}
}

View File

@ -1,17 +0,0 @@
using AutoMapper;
namespace Bit.Infrastructure.EntityFramework.Models;
public class ProviderOrganization : Core.Entities.Provider.ProviderOrganization
{
public virtual Provider Provider { get; set; }
public virtual Organization Organization { get; set; }
}
public class ProviderOrganizationMapperProfile : Profile
{
public ProviderOrganizationMapperProfile()
{
CreateMap<Core.Entities.Provider.ProviderOrganization, ProviderOrganization>().ReverseMap();
}
}

View File

@ -1,17 +0,0 @@
using AutoMapper;
namespace Bit.Infrastructure.EntityFramework.Models;
public class ProviderUser : Core.Entities.Provider.ProviderUser
{
public virtual User User { get; set; }
public virtual Provider Provider { get; set; }
}
public class ProviderUserMapperProfile : Profile
{
public ProviderUserMapperProfile()
{
CreateMap<Core.Entities.Provider.ProviderUser, ProviderUser>().ReverseMap();
}
}

View File

@ -1,4 +1,5 @@
using Bit.Core;
using Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider;
using Bit.Infrastructure.EntityFramework.Auth.Models;
using Bit.Infrastructure.EntityFramework.Converters;
using Bit.Infrastructure.EntityFramework.Models;

View File

@ -1,6 +1,6 @@
using Bit.Core.Auth.Enums;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Auth.Enums;
using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
using Microsoft.EntityFrameworkCore;

View File

@ -1,5 +1,5 @@
using Bit.Core.Enums.Provider;
using Bit.Core.Models.Data;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.AdminConsole.Models.Data.Provider;
namespace Bit.Infrastructure.EntityFramework.Repositories.Queries;

Some files were not shown because too many files have changed in this diff Show More