From 37e9d70bee15ecfe7471bd23b2b9598439a4a83d Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Thu, 19 Oct 2023 01:27:56 +1000 Subject: [PATCH] AC Team code ownership moves - Api project (#3351) --- .../{ => AdminConsole}/Controllers/GroupsController.cs | 5 +++-- .../Controllers/OrganizationUsersController.cs | 7 ++++--- .../Controllers/OrganizationsController.cs | 7 +++++-- .../{ => AdminConsole}/Controllers/PoliciesController.cs | 4 ++-- .../Controllers/ProviderOrganizationsController.cs | 6 +++--- .../Controllers/ProviderUsersController.cs | 6 +++--- .../{ => AdminConsole}/Controllers/ProvidersController.cs | 6 +++--- .../Models/Request/GroupRequestModel.cs | 3 ++- .../Request}/ImportOrganizationUsersRequestModel.cs | 2 +- .../Organizations}/OrganizationApiKeyRequestModel.cs | 2 +- .../Organizations/OrganizationCreateRequestModel.cs | 2 +- .../Request/Organizations/OrganizationKeysRequestModel.cs | 2 +- .../Request/Organizations/OrganizationSeatRequestModel.cs | 2 +- .../Organizations/OrganizationUpdateRequestModel.cs | 2 +- .../Organizations/OrganizationUpgradeRequestModel.cs | 2 +- .../Organizations/OrganizationUserRequestModels.cs | 3 ++- .../Models/Request/PolicyRequestModel.cs | 2 +- .../Providers/ProviderOrganizationAddRequestModel.cs | 2 +- .../Providers/ProviderOrganizationCreateRequestModel.cs | 4 ++-- .../Models/Request/Providers/ProviderSetupRequestModel.cs | 2 +- .../Request/Providers/ProviderUpdateRequestModel.cs | 2 +- .../Models/Request/Providers/ProviderUserRequestModels.cs | 2 +- .../Models/Response/GroupResponseModel.cs | 5 +++-- .../OrganizationApiKeyInformationResponseModel.cs | 2 +- .../OrganizationAutoEnrollStatusResponseModel.cs | 2 +- .../Organizations/OrganizationKeysResponseModel.cs | 2 +- .../Organizations/OrganizationPublicKeyResponseModel.cs | 2 +- .../Response/Organizations/OrganizationResponseModel.cs | 5 +++-- .../Organizations/OrganizationUserResponseModel.cs | 3 ++- .../Models/Response/ProfileOrganizationResponseModel.cs | 2 +- .../Response/ProfileProviderOrganizationResponseModel.cs | 2 +- .../Response/Providers/ProfileProviderResponseModel.cs | 2 +- .../Providers/ProviderOrganizationResponseModel.cs | 2 +- .../Models/Response/Providers/ProviderResponseModel.cs | 2 +- .../Response/Providers/ProviderUserResponseModel.cs | 2 +- .../Public/Controllers/GroupsController.cs | 5 +++-- .../Public/Controllers/MembersController.cs | 5 +++-- .../Public/Controllers/OrganizationController.cs | 5 +++-- .../Public/Controllers/PoliciesController.cs | 5 +++-- .../Public/Models}/GroupBaseModel.cs | 2 +- .../Public/Models}/MemberBaseModel.cs | 2 +- .../Public/Models}/PolicyBaseModel.cs | 2 +- .../Models}/Request/GroupCreateUpdateRequestModel.cs | 2 +- .../Public/Models}/Request/MemberCreateRequestModel.cs | 2 +- .../Public/Models}/Request/MemberUpdateRequestModel.cs | 2 +- .../Models}/Request/OrganizationImportRequestModel.cs | 2 +- .../Public/Models}/Request/PolicyUpdateRequestModel.cs | 2 +- .../Public/Models}/Request/UpdateGroupIdsRequestModel.cs | 2 +- .../Public/Models}/Request/UpdateMemberIdsRequestModel.cs | 2 +- .../Public/Models}/Response/GroupResponseModel.cs | 3 ++- .../Public/Models}/Response/MemberResponseModel.cs | 3 ++- .../Public/Models}/Response/PolicyResponseModel.cs | 3 ++- src/Api/Auth/Controllers/EmergencyAccessController.cs | 4 ++-- src/Api/Controllers/AccountsController.cs | 3 ++- .../SelfHostedOrganizationLicensesController.cs | 4 ++-- .../OrganizationCreateLicenseRequestModel.cs | 1 + src/Api/Models/Response/ProfileResponseModel.cs | 3 ++- .../Controllers/GroupsControllerTests.cs | 6 +++--- .../OrganizationSponsorshipsControllerTests.cs | 2 +- .../Controllers/OrganizationUsersControllerTests.cs | 6 +++--- .../Controllers/OrganizationsControllerTests.cs | 4 ++-- .../Public/Controllers/GroupsControllerTests.cs | 8 ++++---- 62 files changed, 109 insertions(+), 89 deletions(-) rename src/Api/{ => AdminConsole}/Controllers/GroupsController.cs (98%) rename src/Api/{ => AdminConsole}/Controllers/OrganizationUsersController.cs (99%) rename src/Api/{ => AdminConsole}/Controllers/OrganizationsController.cs (99%) rename src/Api/{ => AdminConsole}/Controllers/PoliciesController.cs (98%) rename src/Api/{ => AdminConsole}/Controllers/ProviderOrganizationsController.cs (95%) rename src/Api/{ => AdminConsole}/Controllers/ProviderUsersController.cs (97%) rename src/Api/{ => AdminConsole}/Controllers/ProvidersController.cs (94%) rename src/Api/{ => AdminConsole}/Models/Request/GroupRequestModel.cs (91%) rename src/Api/{Models/Request/Organizations => AdminConsole/Models/Request}/ImportOrganizationUsersRequestModel.cs (97%) rename src/Api/{Models/Request/Accounts => AdminConsole/Models/Request/Organizations}/OrganizationApiKeyRequestModel.cs (77%) rename src/Api/{ => AdminConsole}/Models/Request/Organizations/OrganizationCreateRequestModel.cs (98%) rename src/Api/{ => AdminConsole}/Models/Request/Organizations/OrganizationKeysRequestModel.cs (96%) rename src/Api/{ => AdminConsole}/Models/Request/Organizations/OrganizationSeatRequestModel.cs (88%) rename src/Api/{ => AdminConsole}/Models/Request/Organizations/OrganizationUpdateRequestModel.cs (94%) rename src/Api/{ => AdminConsole}/Models/Request/Organizations/OrganizationUpgradeRequestModel.cs (96%) rename src/Api/{ => AdminConsole}/Models/Request/Organizations/OrganizationUserRequestModels.cs (97%) rename src/Api/{ => AdminConsole}/Models/Request/PolicyRequestModel.cs (94%) rename src/Api/{ => AdminConsole}/Models/Request/Providers/ProviderOrganizationAddRequestModel.cs (79%) rename src/Api/{ => AdminConsole}/Models/Request/Providers/ProviderOrganizationCreateRequestModel.cs (75%) rename src/Api/{ => AdminConsole}/Models/Request/Providers/ProviderSetupRequestModel.cs (92%) rename src/Api/{ => AdminConsole}/Models/Request/Providers/ProviderUpdateRequestModel.cs (93%) rename src/Api/{ => AdminConsole}/Models/Request/Providers/ProviderUserRequestModels.cs (95%) rename src/Api/{ => AdminConsole}/Models/Response/GroupResponseModel.cs (90%) rename src/Api/{ => AdminConsole}/Models/Response/Organizations/OrganizationApiKeyInformationResponseModel.cs (87%) rename src/Api/{ => AdminConsole}/Models/Response/Organizations/OrganizationAutoEnrollStatusResponseModel.cs (86%) rename src/Api/{ => AdminConsole}/Models/Response/Organizations/OrganizationKeysResponseModel.cs (88%) rename src/Api/{ => AdminConsole}/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs (87%) rename src/Api/{ => AdminConsole}/Models/Response/Organizations/OrganizationResponseModel.cs (98%) rename src/Api/{ => AdminConsole}/Models/Response/Organizations/OrganizationUserResponseModel.cs (98%) rename src/Api/{ => AdminConsole}/Models/Response/ProfileOrganizationResponseModel.cs (99%) rename src/Api/{ => AdminConsole}/Models/Response/ProfileProviderOrganizationResponseModel.cs (97%) rename src/Api/{ => AdminConsole}/Models/Response/Providers/ProfileProviderResponseModel.cs (94%) rename src/Api/{ => AdminConsole}/Models/Response/Providers/ProviderOrganizationResponseModel.cs (97%) rename src/Api/{ => AdminConsole}/Models/Response/Providers/ProviderResponseModel.cs (95%) rename src/Api/{ => AdminConsole}/Models/Response/Providers/ProviderUserResponseModel.cs (97%) rename src/Api/{ => AdminConsole}/Public/Controllers/GroupsController.cs (98%) rename src/Api/{ => AdminConsole}/Public/Controllers/MembersController.cs (98%) rename src/Api/{ => AdminConsole}/Public/Controllers/OrganizationController.cs (93%) rename src/Api/{ => AdminConsole}/Public/Controllers/PoliciesController.cs (96%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/GroupBaseModel.cs (94%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/MemberBaseModel.cs (97%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/PolicyBaseModel.cs (88%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Request/GroupCreateUpdateRequestModel.cs (92%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Request/MemberCreateRequestModel.cs (90%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Request/MemberUpdateRequestModel.cs (93%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Request/OrganizationImportRequestModel.cs (98%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Request/PolicyUpdateRequestModel.cs (90%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Request/UpdateGroupIdsRequestModel.cs (77%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Request/UpdateMemberIdsRequestModel.cs (78%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Response/GroupResponseModel.cs (93%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Response/MemberResponseModel.cs (97%) rename src/Api/{Models/Public => AdminConsole/Public/Models}/Response/PolicyResponseModel.cs (92%) rename test/Api.Test/{ => AdminConsole}/Controllers/GroupsControllerTests.cs (95%) rename test/Api.Test/{ => AdminConsole}/Controllers/OrganizationSponsorshipsControllerTests.cs (99%) rename test/Api.Test/{ => AdminConsole}/Controllers/OrganizationUsersControllerTests.cs (96%) rename test/Api.Test/{ => AdminConsole}/Controllers/OrganizationsControllerTests.cs (98%) rename test/Api.Test/{ => AdminConsole}/Public/Controllers/GroupsControllerTests.cs (93%) diff --git a/src/Api/Controllers/GroupsController.cs b/src/Api/AdminConsole/Controllers/GroupsController.cs similarity index 98% rename from src/Api/Controllers/GroupsController.cs rename to src/Api/AdminConsole/Controllers/GroupsController.cs index 0220cfd5e..cd12c8a99 100644 --- a/src/Api/Controllers/GroupsController.cs +++ b/src/Api/AdminConsole/Controllers/GroupsController.cs @@ -1,4 +1,5 @@ -using Bit.Api.Models.Request; +using Bit.Api.AdminConsole.Models.Request; +using Bit.Api.AdminConsole.Models.Response; using Bit.Api.Models.Response; using Bit.Core.Context; using Bit.Core.Exceptions; @@ -8,7 +9,7 @@ using Bit.Core.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Controllers; +namespace Bit.Api.AdminConsole.Controllers; [Route("organizations/{orgId}/groups")] [Authorize("Application")] diff --git a/src/Api/Controllers/OrganizationUsersController.cs b/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs similarity index 99% rename from src/Api/Controllers/OrganizationUsersController.cs rename to src/Api/AdminConsole/Controllers/OrganizationUsersController.cs index d1c4ebacd..6de174ae7 100644 --- a/src/Api/Controllers/OrganizationUsersController.cs +++ b/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs @@ -1,6 +1,7 @@ -using Bit.Api.Models.Request.Organizations; +using Bit.Api.AdminConsole.Models.Request.Organizations; +using Bit.Api.AdminConsole.Models.Response.Organizations; +using Bit.Api.Models.Request.Organizations; using Bit.Api.Models.Response; -using Bit.Api.Models.Response.Organizations; using Bit.Core.Context; using Bit.Core.Enums; using Bit.Core.Exceptions; @@ -14,7 +15,7 @@ using Bit.Core.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Controllers; +namespace Bit.Api.AdminConsole.Controllers; [Route("organizations/{orgId}/users")] [Authorize("Application")] diff --git a/src/Api/Controllers/OrganizationsController.cs b/src/Api/AdminConsole/Controllers/OrganizationsController.cs similarity index 99% rename from src/Api/Controllers/OrganizationsController.cs rename to src/Api/AdminConsole/Controllers/OrganizationsController.cs index 2fea9ec52..948355afa 100644 --- a/src/Api/Controllers/OrganizationsController.cs +++ b/src/Api/AdminConsole/Controllers/OrganizationsController.cs @@ -1,4 +1,8 @@ using System.Text.Json; +using Bit.Api.AdminConsole.Models.Request; +using Bit.Api.AdminConsole.Models.Request.Organizations; +using Bit.Api.AdminConsole.Models.Response; +using Bit.Api.AdminConsole.Models.Response.Organizations; using Bit.Api.Auth.Models.Request.Accounts; using Bit.Api.Auth.Models.Request.Organizations; using Bit.Api.Auth.Models.Response.Organizations; @@ -6,7 +10,6 @@ using Bit.Api.Models.Request; using Bit.Api.Models.Request.Accounts; using Bit.Api.Models.Request.Organizations; using Bit.Api.Models.Response; -using Bit.Api.Models.Response.Organizations; using Bit.Core; using Bit.Core.Auth.Enums; using Bit.Core.Auth.Repositories; @@ -26,7 +29,7 @@ using Bit.Core.Utilities; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Controllers; +namespace Bit.Api.AdminConsole.Controllers; [Route("organizations")] [Authorize("Application")] diff --git a/src/Api/Controllers/PoliciesController.cs b/src/Api/AdminConsole/Controllers/PoliciesController.cs similarity index 98% rename from src/Api/Controllers/PoliciesController.cs rename to src/Api/AdminConsole/Controllers/PoliciesController.cs index e352e1090..6f93c22de 100644 --- a/src/Api/Controllers/PoliciesController.cs +++ b/src/Api/AdminConsole/Controllers/PoliciesController.cs @@ -1,4 +1,4 @@ -using Bit.Api.Models.Request; +using Bit.Api.AdminConsole.Models.Request; using Bit.Api.Models.Response; using Bit.Core.Context; using Bit.Core.Enums; @@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Controllers; +namespace Bit.Api.AdminConsole.Controllers; [Route("organizations/{orgId}/policies")] [Authorize("Application")] diff --git a/src/Api/Controllers/ProviderOrganizationsController.cs b/src/Api/AdminConsole/Controllers/ProviderOrganizationsController.cs similarity index 95% rename from src/Api/Controllers/ProviderOrganizationsController.cs rename to src/Api/AdminConsole/Controllers/ProviderOrganizationsController.cs index 6f8283280..1420311d4 100644 --- a/src/Api/Controllers/ProviderOrganizationsController.cs +++ b/src/Api/AdminConsole/Controllers/ProviderOrganizationsController.cs @@ -1,6 +1,6 @@ -using Bit.Api.Models.Request.Providers; +using Bit.Api.AdminConsole.Models.Request.Providers; +using Bit.Api.AdminConsole.Models.Response.Providers; using Bit.Api.Models.Response; -using Bit.Api.Models.Response.Providers; using Bit.Core.Context; using Bit.Core.Exceptions; using Bit.Core.Repositories; @@ -9,7 +9,7 @@ using Bit.Core.Utilities; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Controllers; +namespace Bit.Api.AdminConsole.Controllers; [Route("providers/{providerId:guid}/organizations")] [Authorize("Application")] diff --git a/src/Api/Controllers/ProviderUsersController.cs b/src/Api/AdminConsole/Controllers/ProviderUsersController.cs similarity index 97% rename from src/Api/Controllers/ProviderUsersController.cs rename to src/Api/AdminConsole/Controllers/ProviderUsersController.cs index 9dbcc49e3..c955e062f 100644 --- a/src/Api/Controllers/ProviderUsersController.cs +++ b/src/Api/AdminConsole/Controllers/ProviderUsersController.cs @@ -1,6 +1,6 @@ -using Bit.Api.Models.Request.Providers; +using Bit.Api.AdminConsole.Models.Request.Providers; +using Bit.Api.AdminConsole.Models.Response.Providers; using Bit.Api.Models.Response; -using Bit.Api.Models.Response.Providers; using Bit.Core.Context; using Bit.Core.Exceptions; using Bit.Core.Models.Business.Provider; @@ -9,7 +9,7 @@ using Bit.Core.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Controllers; +namespace Bit.Api.AdminConsole.Controllers; [Route("providers/{providerId:guid}/users")] [Authorize("Application")] diff --git a/src/Api/Controllers/ProvidersController.cs b/src/Api/AdminConsole/Controllers/ProvidersController.cs similarity index 94% rename from src/Api/Controllers/ProvidersController.cs rename to src/Api/AdminConsole/Controllers/ProvidersController.cs index 5daf9ce49..b61a6d419 100644 --- a/src/Api/Controllers/ProvidersController.cs +++ b/src/Api/AdminConsole/Controllers/ProvidersController.cs @@ -1,5 +1,5 @@ -using Bit.Api.Models.Request.Providers; -using Bit.Api.Models.Response.Providers; +using Bit.Api.AdminConsole.Models.Request.Providers; +using Bit.Api.AdminConsole.Models.Response.Providers; using Bit.Core.Context; using Bit.Core.Exceptions; using Bit.Core.Repositories; @@ -8,7 +8,7 @@ using Bit.Core.Settings; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Controllers; +namespace Bit.Api.AdminConsole.Controllers; [Route("providers")] [Authorize("Application")] diff --git a/src/Api/Models/Request/GroupRequestModel.cs b/src/Api/AdminConsole/Models/Request/GroupRequestModel.cs similarity index 91% rename from src/Api/Models/Request/GroupRequestModel.cs rename to src/Api/AdminConsole/Models/Request/GroupRequestModel.cs index aa52a08af..e15aef7ac 100644 --- a/src/Api/Models/Request/GroupRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/GroupRequestModel.cs @@ -1,7 +1,8 @@ using System.ComponentModel.DataAnnotations; +using Bit.Api.Models.Request; using Bit.Core.Entities; -namespace Bit.Api.Models.Request; +namespace Bit.Api.AdminConsole.Models.Request; public class GroupRequestModel { diff --git a/src/Api/Models/Request/Organizations/ImportOrganizationUsersRequestModel.cs b/src/Api/AdminConsole/Models/Request/ImportOrganizationUsersRequestModel.cs similarity index 97% rename from src/Api/Models/Request/Organizations/ImportOrganizationUsersRequestModel.cs rename to src/Api/AdminConsole/Models/Request/ImportOrganizationUsersRequestModel.cs index 3f1e2b244..decb6d640 100644 --- a/src/Api/Models/Request/Organizations/ImportOrganizationUsersRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/ImportOrganizationUsersRequestModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using Bit.Core.Models.Business; -namespace Bit.Api.Models.Request.Organizations; +namespace Bit.Api.AdminConsole.Models.Request; public class ImportOrganizationUsersRequestModel { diff --git a/src/Api/Models/Request/Accounts/OrganizationApiKeyRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationApiKeyRequestModel.cs similarity index 77% rename from src/Api/Models/Request/Accounts/OrganizationApiKeyRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Organizations/OrganizationApiKeyRequestModel.cs index 5e4dff2ef..af5c4e19d 100644 --- a/src/Api/Models/Request/Accounts/OrganizationApiKeyRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationApiKeyRequestModel.cs @@ -1,7 +1,7 @@ using Bit.Api.Auth.Models.Request.Accounts; using Bit.Core.Enums; -namespace Bit.Api.Models.Request.Accounts; +namespace Bit.Api.AdminConsole.Models.Request.Organizations; public class OrganizationApiKeyRequestModel : SecretVerificationRequestModel { diff --git a/src/Api/Models/Request/Organizations/OrganizationCreateRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationCreateRequestModel.cs similarity index 98% rename from src/Api/Models/Request/Organizations/OrganizationCreateRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Organizations/OrganizationCreateRequestModel.cs index 35151dc4f..2ea4e8b84 100644 --- a/src/Api/Models/Request/Organizations/OrganizationCreateRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationCreateRequestModel.cs @@ -4,7 +4,7 @@ using Bit.Core.Enums; using Bit.Core.Models.Business; using Bit.Core.Utilities; -namespace Bit.Api.Models.Request.Organizations; +namespace Bit.Api.AdminConsole.Models.Request.Organizations; public class OrganizationCreateRequestModel : IValidatableObject { diff --git a/src/Api/Models/Request/Organizations/OrganizationKeysRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationKeysRequestModel.cs similarity index 96% rename from src/Api/Models/Request/Organizations/OrganizationKeysRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Organizations/OrganizationKeysRequestModel.cs index a22b4eaa6..3a343caa2 100644 --- a/src/Api/Models/Request/Organizations/OrganizationKeysRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationKeysRequestModel.cs @@ -2,7 +2,7 @@ using Bit.Core.Entities; using Bit.Core.Models.Business; -namespace Bit.Api.Models.Request.Organizations; +namespace Bit.Api.AdminConsole.Models.Request.Organizations; public class OrganizationKeysRequestModel { diff --git a/src/Api/Models/Request/Organizations/OrganizationSeatRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationSeatRequestModel.cs similarity index 88% rename from src/Api/Models/Request/Organizations/OrganizationSeatRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Organizations/OrganizationSeatRequestModel.cs index b3849f0a4..309adfceb 100644 --- a/src/Api/Models/Request/Organizations/OrganizationSeatRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationSeatRequestModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Bit.Api.Models.Request.Organizations; +namespace Bit.Api.AdminConsole.Models.Request.Organizations; public class OrganizationSeatRequestModel : IValidatableObject { diff --git a/src/Api/Models/Request/Organizations/OrganizationUpdateRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpdateRequestModel.cs similarity index 94% rename from src/Api/Models/Request/Organizations/OrganizationUpdateRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpdateRequestModel.cs index 79983a554..be526ee6c 100644 --- a/src/Api/Models/Request/Organizations/OrganizationUpdateRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpdateRequestModel.cs @@ -3,7 +3,7 @@ using Bit.Core.Entities; using Bit.Core.Models.Data; using Bit.Core.Settings; -namespace Bit.Api.Models.Request.Organizations; +namespace Bit.Api.AdminConsole.Models.Request.Organizations; public class OrganizationUpdateRequestModel { diff --git a/src/Api/Models/Request/Organizations/OrganizationUpgradeRequestModel.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpgradeRequestModel.cs similarity index 96% rename from src/Api/Models/Request/Organizations/OrganizationUpgradeRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpgradeRequestModel.cs index 0c5277ec6..dae1b1d42 100644 --- a/src/Api/Models/Request/Organizations/OrganizationUpgradeRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUpgradeRequestModel.cs @@ -2,7 +2,7 @@ using Bit.Core.Enums; using Bit.Core.Models.Business; -namespace Bit.Api.Models.Request.Organizations; +namespace Bit.Api.AdminConsole.Models.Request.Organizations; public class OrganizationUpgradeRequestModel { diff --git a/src/Api/Models/Request/Organizations/OrganizationUserRequestModels.cs b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUserRequestModels.cs similarity index 97% rename from src/Api/Models/Request/Organizations/OrganizationUserRequestModels.cs rename to src/Api/AdminConsole/Models/Request/Organizations/OrganizationUserRequestModels.cs index 1206d3c97..bf10d85c0 100644 --- a/src/Api/Models/Request/Organizations/OrganizationUserRequestModels.cs +++ b/src/Api/AdminConsole/Models/Request/Organizations/OrganizationUserRequestModels.cs @@ -1,11 +1,12 @@ using System.ComponentModel.DataAnnotations; +using Bit.Api.Models.Request; using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Models.Data; using Bit.Core.Models.Data.Organizations.OrganizationUsers; using Bit.Core.Utilities; -namespace Bit.Api.Models.Request.Organizations; +namespace Bit.Api.AdminConsole.Models.Request.Organizations; public class OrganizationUserInviteRequestModel { diff --git a/src/Api/Models/Request/PolicyRequestModel.cs b/src/Api/AdminConsole/Models/Request/PolicyRequestModel.cs similarity index 94% rename from src/Api/Models/Request/PolicyRequestModel.cs rename to src/Api/AdminConsole/Models/Request/PolicyRequestModel.cs index bc303cd40..b3ba3a6bc 100644 --- a/src/Api/Models/Request/PolicyRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/PolicyRequestModel.cs @@ -3,7 +3,7 @@ using System.Text.Json; using Bit.Core.Entities; using Bit.Core.Enums; -namespace Bit.Api.Models.Request; +namespace Bit.Api.AdminConsole.Models.Request; public class PolicyRequestModel { diff --git a/src/Api/Models/Request/Providers/ProviderOrganizationAddRequestModel.cs b/src/Api/AdminConsole/Models/Request/Providers/ProviderOrganizationAddRequestModel.cs similarity index 79% rename from src/Api/Models/Request/Providers/ProviderOrganizationAddRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Providers/ProviderOrganizationAddRequestModel.cs index b6ea8759e..207d84b78 100644 --- a/src/Api/Models/Request/Providers/ProviderOrganizationAddRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Providers/ProviderOrganizationAddRequestModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Bit.Api.Models.Request.Providers; +namespace Bit.Api.AdminConsole.Models.Request.Providers; public class ProviderOrganizationAddRequestModel { diff --git a/src/Api/Models/Request/Providers/ProviderOrganizationCreateRequestModel.cs b/src/Api/AdminConsole/Models/Request/Providers/ProviderOrganizationCreateRequestModel.cs similarity index 75% rename from src/Api/Models/Request/Providers/ProviderOrganizationCreateRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Providers/ProviderOrganizationCreateRequestModel.cs index 7fead717b..bf75c611e 100644 --- a/src/Api/Models/Request/Providers/ProviderOrganizationCreateRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Providers/ProviderOrganizationCreateRequestModel.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; -using Bit.Api.Models.Request.Organizations; +using Bit.Api.AdminConsole.Models.Request.Organizations; using Bit.Core.Utilities; -namespace Bit.Api.Models.Request.Providers; +namespace Bit.Api.AdminConsole.Models.Request.Providers; public class ProviderOrganizationCreateRequestModel { diff --git a/src/Api/Models/Request/Providers/ProviderSetupRequestModel.cs b/src/Api/AdminConsole/Models/Request/Providers/ProviderSetupRequestModel.cs similarity index 92% rename from src/Api/Models/Request/Providers/ProviderSetupRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Providers/ProviderSetupRequestModel.cs index 51191f947..2c5e4c65b 100644 --- a/src/Api/Models/Request/Providers/ProviderSetupRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Providers/ProviderSetupRequestModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using Bit.Core.Entities.Provider; -namespace Bit.Api.Models.Request.Providers; +namespace Bit.Api.AdminConsole.Models.Request.Providers; public class ProviderSetupRequestModel { diff --git a/src/Api/Models/Request/Providers/ProviderUpdateRequestModel.cs b/src/Api/AdminConsole/Models/Request/Providers/ProviderUpdateRequestModel.cs similarity index 93% rename from src/Api/Models/Request/Providers/ProviderUpdateRequestModel.cs rename to src/Api/AdminConsole/Models/Request/Providers/ProviderUpdateRequestModel.cs index ceec796dc..58b4fc0f5 100644 --- a/src/Api/Models/Request/Providers/ProviderUpdateRequestModel.cs +++ b/src/Api/AdminConsole/Models/Request/Providers/ProviderUpdateRequestModel.cs @@ -2,7 +2,7 @@ using Bit.Core.Entities.Provider; using Bit.Core.Settings; -namespace Bit.Api.Models.Request.Providers; +namespace Bit.Api.AdminConsole.Models.Request.Providers; public class ProviderUpdateRequestModel { diff --git a/src/Api/Models/Request/Providers/ProviderUserRequestModels.cs b/src/Api/AdminConsole/Models/Request/Providers/ProviderUserRequestModels.cs similarity index 95% rename from src/Api/Models/Request/Providers/ProviderUserRequestModels.cs rename to src/Api/AdminConsole/Models/Request/Providers/ProviderUserRequestModels.cs index 9c451d8ad..ec112edc4 100644 --- a/src/Api/Models/Request/Providers/ProviderUserRequestModels.cs +++ b/src/Api/AdminConsole/Models/Request/Providers/ProviderUserRequestModels.cs @@ -3,7 +3,7 @@ using Bit.Core.Entities.Provider; using Bit.Core.Enums.Provider; using Bit.Core.Utilities; -namespace Bit.Api.Models.Request.Providers; +namespace Bit.Api.AdminConsole.Models.Request.Providers; public class ProviderUserInviteRequestModel { diff --git a/src/Api/Models/Response/GroupResponseModel.cs b/src/Api/AdminConsole/Models/Response/GroupResponseModel.cs similarity index 90% rename from src/Api/Models/Response/GroupResponseModel.cs rename to src/Api/AdminConsole/Models/Response/GroupResponseModel.cs index 83dffb755..a4d53438c 100644 --- a/src/Api/Models/Response/GroupResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/GroupResponseModel.cs @@ -1,8 +1,9 @@ -using Bit.Core.Entities; +using Bit.Api.Models.Response; +using Bit.Core.Entities; using Bit.Core.Models.Api; using Bit.Core.Models.Data; -namespace Bit.Api.Models.Response; +namespace Bit.Api.AdminConsole.Models.Response; public class GroupResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Organizations/OrganizationApiKeyInformationResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationApiKeyInformationResponseModel.cs similarity index 87% rename from src/Api/Models/Response/Organizations/OrganizationApiKeyInformationResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Organizations/OrganizationApiKeyInformationResponseModel.cs index a25cb8935..ba1b290db 100644 --- a/src/Api/Models/Response/Organizations/OrganizationApiKeyInformationResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationApiKeyInformationResponseModel.cs @@ -2,7 +2,7 @@ using Bit.Core.Enums; using Bit.Core.Models.Api; -namespace Bit.Api.Models.Response.Organizations; +namespace Bit.Api.AdminConsole.Models.Response.Organizations; public class OrganizationApiKeyInformation : ResponseModel { diff --git a/src/Api/Models/Response/Organizations/OrganizationAutoEnrollStatusResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationAutoEnrollStatusResponseModel.cs similarity index 86% rename from src/Api/Models/Response/Organizations/OrganizationAutoEnrollStatusResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Organizations/OrganizationAutoEnrollStatusResponseModel.cs index 2318d3ff0..c853b78a6 100644 --- a/src/Api/Models/Response/Organizations/OrganizationAutoEnrollStatusResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationAutoEnrollStatusResponseModel.cs @@ -1,6 +1,6 @@ using Bit.Core.Models.Api; -namespace Bit.Api.Models.Response.Organizations; +namespace Bit.Api.AdminConsole.Models.Response.Organizations; public class OrganizationAutoEnrollStatusResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Organizations/OrganizationKeysResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationKeysResponseModel.cs similarity index 88% rename from src/Api/Models/Response/Organizations/OrganizationKeysResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Organizations/OrganizationKeysResponseModel.cs index 35c2f77e7..a2e4fe058 100644 --- a/src/Api/Models/Response/Organizations/OrganizationKeysResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationKeysResponseModel.cs @@ -1,7 +1,7 @@ using Bit.Core.Entities; using Bit.Core.Models.Api; -namespace Bit.Api.Models.Response.Organizations; +namespace Bit.Api.AdminConsole.Models.Response.Organizations; public class OrganizationKeysResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs similarity index 87% rename from src/Api/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs index 0451433e1..dc1247961 100644 --- a/src/Api/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationPublicKeyResponseModel.cs @@ -1,7 +1,7 @@ using Bit.Core.Entities; using Bit.Core.Models.Api; -namespace Bit.Api.Models.Response.Organizations; +namespace Bit.Api.AdminConsole.Models.Response.Organizations; public class OrganizationPublicKeyResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Organizations/OrganizationResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs similarity index 98% rename from src/Api/Models/Response/Organizations/OrganizationResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs index b56a06777..1d83f79e1 100644 --- a/src/Api/Models/Response/Organizations/OrganizationResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs @@ -1,11 +1,12 @@ -using Bit.Core.Entities; +using Bit.Api.Models.Response; +using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Models.Api; using Bit.Core.Models.Business; using Bit.Core.Utilities; using Constants = Bit.Core.Constants; -namespace Bit.Api.Models.Response.Organizations; +namespace Bit.Api.AdminConsole.Models.Response.Organizations; public class OrganizationResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Organizations/OrganizationUserResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationUserResponseModel.cs similarity index 98% rename from src/Api/Models/Response/Organizations/OrganizationUserResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Organizations/OrganizationUserResponseModel.cs index 06a39f3f9..ee1d790fa 100644 --- a/src/Api/Models/Response/Organizations/OrganizationUserResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationUserResponseModel.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Bit.Api.Models.Response; using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Models.Api; @@ -6,7 +7,7 @@ using Bit.Core.Models.Data; using Bit.Core.Models.Data.Organizations.OrganizationUsers; using Bit.Core.Utilities; -namespace Bit.Api.Models.Response.Organizations; +namespace Bit.Api.AdminConsole.Models.Response.Organizations; public class OrganizationUserResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/ProfileOrganizationResponseModel.cs b/src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs similarity index 99% rename from src/Api/Models/Response/ProfileOrganizationResponseModel.cs rename to src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs index 10b5ea161..04b3f7602 100644 --- a/src/Api/Models/Response/ProfileOrganizationResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs @@ -7,7 +7,7 @@ using Bit.Core.Models.Data; using Bit.Core.Models.Data.Organizations.OrganizationUsers; using Bit.Core.Utilities; -namespace Bit.Api.Models.Response; +namespace Bit.Api.AdminConsole.Models.Response; public class ProfileOrganizationResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/ProfileProviderOrganizationResponseModel.cs b/src/Api/AdminConsole/Models/Response/ProfileProviderOrganizationResponseModel.cs similarity index 97% rename from src/Api/Models/Response/ProfileProviderOrganizationResponseModel.cs rename to src/Api/AdminConsole/Models/Response/ProfileProviderOrganizationResponseModel.cs index 9a66de2e1..b79a32560 100644 --- a/src/Api/Models/Response/ProfileProviderOrganizationResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/ProfileProviderOrganizationResponseModel.cs @@ -2,7 +2,7 @@ using Bit.Core.Models.Data; using Bit.Core.Utilities; -namespace Bit.Api.Models.Response; +namespace Bit.Api.AdminConsole.Models.Response; public class ProfileProviderOrganizationResponseModel : ProfileOrganizationResponseModel { diff --git a/src/Api/Models/Response/Providers/ProfileProviderResponseModel.cs b/src/Api/AdminConsole/Models/Response/Providers/ProfileProviderResponseModel.cs similarity index 94% rename from src/Api/Models/Response/Providers/ProfileProviderResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Providers/ProfileProviderResponseModel.cs index e2d494dad..ac725618b 100644 --- a/src/Api/Models/Response/Providers/ProfileProviderResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Providers/ProfileProviderResponseModel.cs @@ -3,7 +3,7 @@ using Bit.Core.Models.Api; using Bit.Core.Models.Data; using Bit.Core.Utilities; -namespace Bit.Api.Models.Response.Providers; +namespace Bit.Api.AdminConsole.Models.Response.Providers; public class ProfileProviderResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Providers/ProviderOrganizationResponseModel.cs b/src/Api/AdminConsole/Models/Response/Providers/ProviderOrganizationResponseModel.cs similarity index 97% rename from src/Api/Models/Response/Providers/ProviderOrganizationResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Providers/ProviderOrganizationResponseModel.cs index 9bc7d52dc..a2e9d9f4a 100644 --- a/src/Api/Models/Response/Providers/ProviderOrganizationResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Providers/ProviderOrganizationResponseModel.cs @@ -2,7 +2,7 @@ using Bit.Core.Models.Api; using Bit.Core.Models.Data; -namespace Bit.Api.Models.Response.Providers; +namespace Bit.Api.AdminConsole.Models.Response.Providers; public class ProviderOrganizationResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Providers/ProviderResponseModel.cs b/src/Api/AdminConsole/Models/Response/Providers/ProviderResponseModel.cs similarity index 95% rename from src/Api/Models/Response/Providers/ProviderResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Providers/ProviderResponseModel.cs index ce62fdaa6..5e26d1d4b 100644 --- a/src/Api/Models/Response/Providers/ProviderResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Providers/ProviderResponseModel.cs @@ -1,7 +1,7 @@ using Bit.Core.Entities.Provider; using Bit.Core.Models.Api; -namespace Bit.Api.Models.Response.Providers; +namespace Bit.Api.AdminConsole.Models.Response.Providers; public class ProviderResponseModel : ResponseModel { diff --git a/src/Api/Models/Response/Providers/ProviderUserResponseModel.cs b/src/Api/AdminConsole/Models/Response/Providers/ProviderUserResponseModel.cs similarity index 97% rename from src/Api/Models/Response/Providers/ProviderUserResponseModel.cs rename to src/Api/AdminConsole/Models/Response/Providers/ProviderUserResponseModel.cs index b47b9cdd2..100802288 100644 --- a/src/Api/Models/Response/Providers/ProviderUserResponseModel.cs +++ b/src/Api/AdminConsole/Models/Response/Providers/ProviderUserResponseModel.cs @@ -4,7 +4,7 @@ using Bit.Core.Models.Api; using Bit.Core.Models.Data; using Bit.Core.Utilities; -namespace Bit.Api.Models.Response.Providers; +namespace Bit.Api.AdminConsole.Models.Response.Providers; public class ProviderUserResponseModel : ResponseModel { diff --git a/src/Api/Public/Controllers/GroupsController.cs b/src/Api/AdminConsole/Public/Controllers/GroupsController.cs similarity index 98% rename from src/Api/Public/Controllers/GroupsController.cs rename to src/Api/AdminConsole/Public/Controllers/GroupsController.cs index 708040545..c87d0c2d3 100644 --- a/src/Api/Public/Controllers/GroupsController.cs +++ b/src/Api/AdminConsole/Public/Controllers/GroupsController.cs @@ -1,5 +1,6 @@ using System.Net; -using Bit.Api.Models.Public.Request; +using Bit.Api.AdminConsole.Public.Models.Request; +using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Api.Models.Public.Response; using Bit.Core.Context; using Bit.Core.OrganizationFeatures.Groups.Interfaces; @@ -7,7 +8,7 @@ using Bit.Core.Repositories; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Public.Controllers; +namespace Bit.Api.AdminConsole.Public.Controllers; [Route("public/groups")] [Authorize("Organization")] diff --git a/src/Api/Public/Controllers/MembersController.cs b/src/Api/AdminConsole/Public/Controllers/MembersController.cs similarity index 98% rename from src/Api/Public/Controllers/MembersController.cs rename to src/Api/AdminConsole/Public/Controllers/MembersController.cs index 74dd4b83e..cefed4a5a 100644 --- a/src/Api/Public/Controllers/MembersController.cs +++ b/src/Api/AdminConsole/Public/Controllers/MembersController.cs @@ -1,5 +1,6 @@ using System.Net; -using Bit.Api.Models.Public.Request; +using Bit.Api.AdminConsole.Public.Models.Request; +using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Api.Models.Public.Response; using Bit.Core.Context; using Bit.Core.Models.Business; @@ -9,7 +10,7 @@ using Bit.Core.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Public.Controllers; +namespace Bit.Api.AdminConsole.Public.Controllers; [Route("public/members")] [Authorize("Organization")] diff --git a/src/Api/Public/Controllers/OrganizationController.cs b/src/Api/AdminConsole/Public/Controllers/OrganizationController.cs similarity index 93% rename from src/Api/Public/Controllers/OrganizationController.cs rename to src/Api/AdminConsole/Public/Controllers/OrganizationController.cs index ce0683b95..65dc15e77 100644 --- a/src/Api/Public/Controllers/OrganizationController.cs +++ b/src/Api/AdminConsole/Public/Controllers/OrganizationController.cs @@ -1,5 +1,6 @@ using System.Net; -using Bit.Api.Models.Public.Request; +using Bit.Api.AdminConsole.Public.Models.Request; +using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Api.Models.Public.Response; using Bit.Core.Context; using Bit.Core.Exceptions; @@ -8,7 +9,7 @@ using Bit.Core.Settings; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Public.Controllers; +namespace Bit.Api.AdminConsole.Public.Controllers; [Route("public/organization")] [Authorize("Organization")] diff --git a/src/Api/Public/Controllers/PoliciesController.cs b/src/Api/AdminConsole/Public/Controllers/PoliciesController.cs similarity index 96% rename from src/Api/Public/Controllers/PoliciesController.cs rename to src/Api/AdminConsole/Public/Controllers/PoliciesController.cs index b208938ed..bcabb969c 100644 --- a/src/Api/Public/Controllers/PoliciesController.cs +++ b/src/Api/AdminConsole/Public/Controllers/PoliciesController.cs @@ -1,5 +1,6 @@ using System.Net; -using Bit.Api.Models.Public.Request; +using Bit.Api.AdminConsole.Public.Models.Request; +using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Api.Models.Public.Response; using Bit.Core.Context; using Bit.Core.Enums; @@ -8,7 +9,7 @@ using Bit.Core.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -namespace Bit.Api.Public.Controllers; +namespace Bit.Api.AdminConsole.Public.Controllers; [Route("public/policies")] [Authorize("Organization")] diff --git a/src/Api/Models/Public/GroupBaseModel.cs b/src/Api/AdminConsole/Public/Models/GroupBaseModel.cs similarity index 94% rename from src/Api/Models/Public/GroupBaseModel.cs rename to src/Api/AdminConsole/Public/Models/GroupBaseModel.cs index 2b09e2952..ff1813aff 100644 --- a/src/Api/Models/Public/GroupBaseModel.cs +++ b/src/Api/AdminConsole/Public/Models/GroupBaseModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Bit.Api.Models.Public; +namespace Bit.Api.AdminConsole.Public.Models; public abstract class GroupBaseModel { diff --git a/src/Api/Models/Public/MemberBaseModel.cs b/src/Api/AdminConsole/Public/Models/MemberBaseModel.cs similarity index 97% rename from src/Api/Models/Public/MemberBaseModel.cs rename to src/Api/AdminConsole/Public/Models/MemberBaseModel.cs index af57d8064..d7eaf9850 100644 --- a/src/Api/Models/Public/MemberBaseModel.cs +++ b/src/Api/AdminConsole/Public/Models/MemberBaseModel.cs @@ -3,7 +3,7 @@ using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Models.Data.Organizations.OrganizationUsers; -namespace Bit.Api.Models.Public; +namespace Bit.Api.AdminConsole.Public.Models; public abstract class MemberBaseModel { diff --git a/src/Api/Models/Public/PolicyBaseModel.cs b/src/Api/AdminConsole/Public/Models/PolicyBaseModel.cs similarity index 88% rename from src/Api/Models/Public/PolicyBaseModel.cs rename to src/Api/AdminConsole/Public/Models/PolicyBaseModel.cs index 2ad8e7600..f474d87ec 100644 --- a/src/Api/Models/Public/PolicyBaseModel.cs +++ b/src/Api/AdminConsole/Public/Models/PolicyBaseModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Bit.Api.Models.Public; +namespace Bit.Api.AdminConsole.Public.Models; public abstract class PolicyBaseModel { diff --git a/src/Api/Models/Public/Request/GroupCreateUpdateRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/GroupCreateUpdateRequestModel.cs similarity index 92% rename from src/Api/Models/Public/Request/GroupCreateUpdateRequestModel.cs rename to src/Api/AdminConsole/Public/Models/Request/GroupCreateUpdateRequestModel.cs index aa100b6a7..d99165cc6 100644 --- a/src/Api/Models/Public/Request/GroupCreateUpdateRequestModel.cs +++ b/src/Api/AdminConsole/Public/Models/Request/GroupCreateUpdateRequestModel.cs @@ -1,7 +1,7 @@ using Bit.Api.Auth.Models.Public.Request; using Bit.Core.Entities; -namespace Bit.Api.Models.Public.Request; +namespace Bit.Api.AdminConsole.Public.Models.Request; public class GroupCreateUpdateRequestModel : GroupBaseModel { diff --git a/src/Api/Models/Public/Request/MemberCreateRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/MemberCreateRequestModel.cs similarity index 90% rename from src/Api/Models/Public/Request/MemberCreateRequestModel.cs rename to src/Api/AdminConsole/Public/Models/Request/MemberCreateRequestModel.cs index 447434e47..cdbc99d0d 100644 --- a/src/Api/Models/Public/Request/MemberCreateRequestModel.cs +++ b/src/Api/AdminConsole/Public/Models/Request/MemberCreateRequestModel.cs @@ -2,7 +2,7 @@ using Bit.Core.Entities; using Bit.Core.Utilities; -namespace Bit.Api.Models.Public.Request; +namespace Bit.Api.AdminConsole.Public.Models.Request; public class MemberCreateRequestModel : MemberUpdateRequestModel { diff --git a/src/Api/Models/Public/Request/MemberUpdateRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/MemberUpdateRequestModel.cs similarity index 93% rename from src/Api/Models/Public/Request/MemberUpdateRequestModel.cs rename to src/Api/AdminConsole/Public/Models/Request/MemberUpdateRequestModel.cs index 733e1285e..18aced437 100644 --- a/src/Api/Models/Public/Request/MemberUpdateRequestModel.cs +++ b/src/Api/AdminConsole/Public/Models/Request/MemberUpdateRequestModel.cs @@ -1,7 +1,7 @@ using Bit.Api.Auth.Models.Public.Request; using Bit.Core.Entities; -namespace Bit.Api.Models.Public.Request; +namespace Bit.Api.AdminConsole.Public.Models.Request; public class MemberUpdateRequestModel : MemberBaseModel { diff --git a/src/Api/Models/Public/Request/OrganizationImportRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/OrganizationImportRequestModel.cs similarity index 98% rename from src/Api/Models/Public/Request/OrganizationImportRequestModel.cs rename to src/Api/AdminConsole/Public/Models/Request/OrganizationImportRequestModel.cs index 70bf649a2..eeb972d7a 100644 --- a/src/Api/Models/Public/Request/OrganizationImportRequestModel.cs +++ b/src/Api/AdminConsole/Public/Models/Request/OrganizationImportRequestModel.cs @@ -4,7 +4,7 @@ using Bit.Core.Entities; using Bit.Core.Models.Business; using Bit.Core.Utilities; -namespace Bit.Api.Models.Public.Request; +namespace Bit.Api.AdminConsole.Public.Models.Request; public class OrganizationImportRequestModel { diff --git a/src/Api/Models/Public/Request/PolicyUpdateRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/PolicyUpdateRequestModel.cs similarity index 90% rename from src/Api/Models/Public/Request/PolicyUpdateRequestModel.cs rename to src/Api/AdminConsole/Public/Models/Request/PolicyUpdateRequestModel.cs index 251b9358d..1866da6ec 100644 --- a/src/Api/Models/Public/Request/PolicyUpdateRequestModel.cs +++ b/src/Api/AdminConsole/Public/Models/Request/PolicyUpdateRequestModel.cs @@ -1,7 +1,7 @@ using System.Text.Json; using Bit.Core.Entities; -namespace Bit.Api.Models.Public.Request; +namespace Bit.Api.AdminConsole.Public.Models.Request; public class PolicyUpdateRequestModel : PolicyBaseModel { diff --git a/src/Api/Models/Public/Request/UpdateGroupIdsRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/UpdateGroupIdsRequestModel.cs similarity index 77% rename from src/Api/Models/Public/Request/UpdateGroupIdsRequestModel.cs rename to src/Api/AdminConsole/Public/Models/Request/UpdateGroupIdsRequestModel.cs index 7a818e5bb..c55be36ff 100644 --- a/src/Api/Models/Public/Request/UpdateGroupIdsRequestModel.cs +++ b/src/Api/AdminConsole/Public/Models/Request/UpdateGroupIdsRequestModel.cs @@ -1,4 +1,4 @@ -namespace Bit.Api.Models.Public.Request; +namespace Bit.Api.AdminConsole.Public.Models.Request; public class UpdateGroupIdsRequestModel { diff --git a/src/Api/Models/Public/Request/UpdateMemberIdsRequestModel.cs b/src/Api/AdminConsole/Public/Models/Request/UpdateMemberIdsRequestModel.cs similarity index 78% rename from src/Api/Models/Public/Request/UpdateMemberIdsRequestModel.cs rename to src/Api/AdminConsole/Public/Models/Request/UpdateMemberIdsRequestModel.cs index 87a241831..412471992 100644 --- a/src/Api/Models/Public/Request/UpdateMemberIdsRequestModel.cs +++ b/src/Api/AdminConsole/Public/Models/Request/UpdateMemberIdsRequestModel.cs @@ -1,4 +1,4 @@ -namespace Bit.Api.Models.Public.Request; +namespace Bit.Api.AdminConsole.Public.Models.Request; public class UpdateMemberIdsRequestModel { diff --git a/src/Api/Models/Public/Response/GroupResponseModel.cs b/src/Api/AdminConsole/Public/Models/Response/GroupResponseModel.cs similarity index 93% rename from src/Api/Models/Public/Response/GroupResponseModel.cs rename to src/Api/AdminConsole/Public/Models/Response/GroupResponseModel.cs index 82c053c66..ca252ec0e 100644 --- a/src/Api/Models/Public/Response/GroupResponseModel.cs +++ b/src/Api/AdminConsole/Public/Models/Response/GroupResponseModel.cs @@ -1,9 +1,10 @@ using System.ComponentModel.DataAnnotations; using Bit.Api.Auth.Models.Public.Response; +using Bit.Api.Models.Public.Response; using Bit.Core.Entities; using Bit.Core.Models.Data; -namespace Bit.Api.Models.Public.Response; +namespace Bit.Api.AdminConsole.Public.Models.Response; /// /// A user group. diff --git a/src/Api/Models/Public/Response/MemberResponseModel.cs b/src/Api/AdminConsole/Public/Models/Response/MemberResponseModel.cs similarity index 97% rename from src/Api/Models/Public/Response/MemberResponseModel.cs rename to src/Api/AdminConsole/Public/Models/Response/MemberResponseModel.cs index b2e094cfa..4f2ff1c17 100644 --- a/src/Api/Models/Public/Response/MemberResponseModel.cs +++ b/src/Api/AdminConsole/Public/Models/Response/MemberResponseModel.cs @@ -1,11 +1,12 @@ using System.ComponentModel.DataAnnotations; using Bit.Api.Auth.Models.Public.Response; +using Bit.Api.Models.Public.Response; using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Models.Data; using Bit.Core.Models.Data.Organizations.OrganizationUsers; -namespace Bit.Api.Models.Public.Response; +namespace Bit.Api.AdminConsole.Public.Models.Response; /// /// An organization member. diff --git a/src/Api/Models/Public/Response/PolicyResponseModel.cs b/src/Api/AdminConsole/Public/Models/Response/PolicyResponseModel.cs similarity index 92% rename from src/Api/Models/Public/Response/PolicyResponseModel.cs rename to src/Api/AdminConsole/Public/Models/Response/PolicyResponseModel.cs index b30c28322..3b196874d 100644 --- a/src/Api/Models/Public/Response/PolicyResponseModel.cs +++ b/src/Api/AdminConsole/Public/Models/Response/PolicyResponseModel.cs @@ -1,9 +1,10 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json; +using Bit.Api.Models.Public.Response; using Bit.Core.Entities; using Bit.Core.Enums; -namespace Bit.Api.Models.Public.Response; +namespace Bit.Api.AdminConsole.Public.Models.Response; /// /// A policy. diff --git a/src/Api/Auth/Controllers/EmergencyAccessController.cs b/src/Api/Auth/Controllers/EmergencyAccessController.cs index cb58e8dfe..ec2a9fc6b 100644 --- a/src/Api/Auth/Controllers/EmergencyAccessController.cs +++ b/src/Api/Auth/Controllers/EmergencyAccessController.cs @@ -1,6 +1,6 @@ -using Bit.Api.Auth.Models.Request; +using Bit.Api.AdminConsole.Models.Request.Organizations; +using Bit.Api.Auth.Models.Request; using Bit.Api.Auth.Models.Response; -using Bit.Api.Models.Request.Organizations; using Bit.Api.Models.Response; using Bit.Api.Vault.Models.Response; using Bit.Core.Auth.Services; diff --git a/src/Api/Controllers/AccountsController.cs b/src/Api/Controllers/AccountsController.cs index d199c223d..7c3683846 100644 --- a/src/Api/Controllers/AccountsController.cs +++ b/src/Api/Controllers/AccountsController.cs @@ -1,4 +1,5 @@ -using Bit.Api.Auth.Models.Request.Accounts; +using Bit.Api.AdminConsole.Models.Response; +using Bit.Api.Auth.Models.Request.Accounts; using Bit.Api.Models.Request; using Bit.Api.Models.Request.Accounts; using Bit.Api.Models.Response; diff --git a/src/Api/Controllers/SelfHosted/SelfHostedOrganizationLicensesController.cs b/src/Api/Controllers/SelfHosted/SelfHostedOrganizationLicensesController.cs index c821204c7..783c4b71f 100644 --- a/src/Api/Controllers/SelfHosted/SelfHostedOrganizationLicensesController.cs +++ b/src/Api/Controllers/SelfHosted/SelfHostedOrganizationLicensesController.cs @@ -1,6 +1,6 @@ -using Bit.Api.Models.Request; +using Bit.Api.AdminConsole.Models.Response.Organizations; +using Bit.Api.Models.Request; using Bit.Api.Models.Request.Organizations; -using Bit.Api.Models.Response.Organizations; using Bit.Api.Utilities; using Bit.Core.Context; using Bit.Core.Enums; diff --git a/src/Api/Models/Request/Organizations/OrganizationCreateLicenseRequestModel.cs b/src/Api/Models/Request/Organizations/OrganizationCreateLicenseRequestModel.cs index 2d9175158..5ee7a632a 100644 --- a/src/Api/Models/Request/Organizations/OrganizationCreateLicenseRequestModel.cs +++ b/src/Api/Models/Request/Organizations/OrganizationCreateLicenseRequestModel.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using Bit.Api.AdminConsole.Models.Request.Organizations; using Bit.Core.Utilities; namespace Bit.Api.Models.Request.Organizations; diff --git a/src/Api/Models/Response/ProfileResponseModel.cs b/src/Api/Models/Response/ProfileResponseModel.cs index 1fbf002e2..312e7ed7e 100644 --- a/src/Api/Models/Response/ProfileResponseModel.cs +++ b/src/Api/Models/Response/ProfileResponseModel.cs @@ -1,4 +1,5 @@ -using Bit.Api.Models.Response.Providers; +using Bit.Api.AdminConsole.Models.Response; +using Bit.Api.AdminConsole.Models.Response.Providers; using Bit.Core.Entities; using Bit.Core.Models.Api; using Bit.Core.Models.Data; diff --git a/test/Api.Test/Controllers/GroupsControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/GroupsControllerTests.cs similarity index 95% rename from test/Api.Test/Controllers/GroupsControllerTests.cs rename to test/Api.Test/AdminConsole/Controllers/GroupsControllerTests.cs index 8a8b65546..1bf97e0e8 100644 --- a/test/Api.Test/Controllers/GroupsControllerTests.cs +++ b/test/Api.Test/AdminConsole/Controllers/GroupsControllerTests.cs @@ -1,5 +1,5 @@ -using Bit.Api.Controllers; -using Bit.Api.Models.Request; +using Bit.Api.AdminConsole.Controllers; +using Bit.Api.AdminConsole.Models.Request; using Bit.Core.Context; using Bit.Core.Entities; using Bit.Core.Models.Data; @@ -10,7 +10,7 @@ using Bit.Test.Common.AutoFixture.Attributes; using NSubstitute; using Xunit; -namespace Bit.Api.Test.Controllers; +namespace Bit.Api.Test.AdminConsole.Controllers; [ControllerCustomize(typeof(GroupsController))] [SutProviderCustomize] diff --git a/test/Api.Test/Controllers/OrganizationSponsorshipsControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationSponsorshipsControllerTests.cs similarity index 99% rename from test/Api.Test/Controllers/OrganizationSponsorshipsControllerTests.cs rename to test/Api.Test/AdminConsole/Controllers/OrganizationSponsorshipsControllerTests.cs index e58add5ef..e54a89688 100644 --- a/test/Api.Test/Controllers/OrganizationSponsorshipsControllerTests.cs +++ b/test/Api.Test/AdminConsole/Controllers/OrganizationSponsorshipsControllerTests.cs @@ -13,7 +13,7 @@ using Bit.Test.Common.AutoFixture.Attributes; using NSubstitute; using Xunit; -namespace Bit.Api.Test.Controllers; +namespace Bit.Api.Test.AdminConsole.Controllers; [ControllerCustomize(typeof(OrganizationSponsorshipsController))] [SutProviderCustomize] diff --git a/test/Api.Test/Controllers/OrganizationUsersControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs similarity index 96% rename from test/Api.Test/Controllers/OrganizationUsersControllerTests.cs rename to test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs index 6053d17dd..4b5c633cb 100644 --- a/test/Api.Test/Controllers/OrganizationUsersControllerTests.cs +++ b/test/Api.Test/AdminConsole/Controllers/OrganizationUsersControllerTests.cs @@ -1,5 +1,5 @@ -using Bit.Api.Controllers; -using Bit.Api.Models.Request.Organizations; +using Bit.Api.AdminConsole.Controllers; +using Bit.Api.AdminConsole.Models.Request.Organizations; using Bit.Core.Entities; using Bit.Core.Models.Data.Organizations.Policies; using Bit.Core.Repositories; @@ -10,7 +10,7 @@ using Bit.Test.Common.AutoFixture.Attributes; using NSubstitute; using Xunit; -namespace Bit.Api.Test.Controllers; +namespace Bit.Api.Test.AdminConsole.Controllers; [ControllerCustomize(typeof(OrganizationUsersController))] [SutProviderCustomize] diff --git a/test/Api.Test/Controllers/OrganizationsControllerTests.cs b/test/Api.Test/AdminConsole/Controllers/OrganizationsControllerTests.cs similarity index 98% rename from test/Api.Test/Controllers/OrganizationsControllerTests.cs rename to test/Api.Test/AdminConsole/Controllers/OrganizationsControllerTests.cs index 8f8f9b20d..2568ba518 100644 --- a/test/Api.Test/Controllers/OrganizationsControllerTests.cs +++ b/test/Api.Test/AdminConsole/Controllers/OrganizationsControllerTests.cs @@ -1,6 +1,6 @@ using System.Security.Claims; using AutoFixture.Xunit2; -using Bit.Api.Controllers; +using Bit.Api.AdminConsole.Controllers; using Bit.Core.Auth.Entities; using Bit.Core.Auth.Enums; using Bit.Core.Auth.Models.Data; @@ -18,7 +18,7 @@ using Bit.Core.Settings; using NSubstitute; using Xunit; -namespace Bit.Api.Test.Controllers; +namespace Bit.Api.Test.AdminConsole.Controllers; public class OrganizationsControllerTests : IDisposable { diff --git a/test/Api.Test/Public/Controllers/GroupsControllerTests.cs b/test/Api.Test/AdminConsole/Public/Controllers/GroupsControllerTests.cs similarity index 93% rename from test/Api.Test/Public/Controllers/GroupsControllerTests.cs rename to test/Api.Test/AdminConsole/Public/Controllers/GroupsControllerTests.cs index fe268ff1e..2ba4cfd01 100644 --- a/test/Api.Test/Public/Controllers/GroupsControllerTests.cs +++ b/test/Api.Test/AdminConsole/Public/Controllers/GroupsControllerTests.cs @@ -1,6 +1,6 @@ -using Bit.Api.Models.Public.Request; -using Bit.Api.Models.Public.Response; -using Bit.Api.Public.Controllers; +using Bit.Api.AdminConsole.Public.Controllers; +using Bit.Api.AdminConsole.Public.Models.Request; +using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Core.Context; using Bit.Core.Entities; using Bit.Core.Models.Data; @@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Mvc; using NSubstitute; using Xunit; -namespace Bit.Api.Test.Public.Controllers; +namespace Bit.Api.Test.AdminConsole.Public.Controllers; [ControllerCustomize(typeof(GroupsController))] [SutProviderCustomize]