1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

[AC-1750] AC Team code ownership moves - Groups (#3358)

This commit is contained in:
Thomas Rittson 2023-10-20 06:37:46 +10:00 committed by GitHub
parent dd8ffa2cbc
commit c1cf07d764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
72 changed files with 192 additions and 124 deletions

View File

@ -1,4 +1,5 @@
using Bit.Core.Context; using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Core.SecretsManager.AuthorizationRequirements; using Bit.Core.SecretsManager.AuthorizationRequirements;

View File

@ -1,6 +1,7 @@
using Bit.Core.Enums; using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Scim.Groups.Interfaces; using Bit.Scim.Groups.Interfaces;
using Bit.Scim.Models; using Bit.Scim.Models;

View File

@ -1,5 +1,5 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Repositories; using Bit.Core.AdminConsole.Repositories;
using Bit.Scim.Groups.Interfaces; using Bit.Scim.Groups.Interfaces;
namespace Bit.Scim.Groups; namespace Bit.Scim.Groups;

View File

@ -1,4 +1,4 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
namespace Bit.Scim.Groups.Interfaces; namespace Bit.Scim.Groups.Interfaces;

View File

@ -1,4 +1,5 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Scim.Models; using Bit.Scim.Models;
namespace Bit.Scim.Groups.Interfaces; namespace Bit.Scim.Groups.Interfaces;

View File

@ -1,4 +1,5 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Scim.Models; using Bit.Scim.Models;
namespace Bit.Scim.Groups.Interfaces; namespace Bit.Scim.Groups.Interfaces;

View File

@ -1,10 +1,10 @@
using System.Text.Json; using System.Text.Json;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Scim.Groups.Interfaces; using Bit.Scim.Groups.Interfaces;
using Bit.Scim.Models; using Bit.Scim.Models;

View File

@ -1,8 +1,10 @@
using Bit.Core.AdminConsole.Enums; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Scim.Context; using Bit.Scim.Context;
using Bit.Scim.Groups.Interfaces; using Bit.Scim.Groups.Interfaces;

View File

@ -1,9 +1,10 @@
using Bit.Core.AdminConsole.Enums; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories;
using Bit.Scim.Context; using Bit.Scim.Context;
using Bit.Scim.Groups.Interfaces; using Bit.Scim.Groups.Interfaces;
using Bit.Scim.Models; using Bit.Scim.Models;

View File

@ -1,4 +1,4 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Utilities; using Bit.Core.Utilities;
namespace Bit.Scim.Models; namespace Bit.Scim.Models;

View File

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

View File

@ -2,6 +2,8 @@
using System.Security.Claims; using System.Security.Claims;
using Bit.Commercial.Core.SecretsManager.AuthorizationHandlers.AccessPolicies; using Bit.Commercial.Core.SecretsManager.AuthorizationHandlers.AccessPolicies;
using Bit.Commercial.Core.Test.SecretsManager.Enums; using Bit.Commercial.Core.Test.SecretsManager.Enums;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;

View File

@ -1,5 +1,5 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Repositories; using Bit.Core.AdminConsole.Repositories;
using Bit.Scim.Groups; using Bit.Scim.Groups;
using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes; using Bit.Test.Common.AutoFixture.Attributes;

View File

@ -1,10 +1,11 @@
using System.Text.Json; using System.Text.Json;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Scim.Groups; using Bit.Scim.Groups;
using Bit.Scim.Models; using Bit.Scim.Models;
using Bit.Scim.Utilities; using Bit.Scim.Utilities;

View File

@ -1,9 +1,10 @@
using Bit.Core.AdminConsole.Enums; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories;
using Bit.Scim.Context; using Bit.Scim.Context;
using Bit.Scim.Groups; using Bit.Scim.Groups;
using Bit.Scim.Models; using Bit.Scim.Models;

View File

@ -1,9 +1,10 @@
using Bit.Core.AdminConsole.Enums; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories;
using Bit.Scim.Context; using Bit.Scim.Context;
using Bit.Scim.Groups; using Bit.Scim.Groups;
using Bit.Scim.Models; using Bit.Scim.Models;

View File

@ -2,6 +2,8 @@
using Bit.Admin.Models; using Bit.Admin.Models;
using Bit.Admin.Services; using Bit.Admin.Services;
using Bit.Admin.Utilities; using Bit.Admin.Utilities;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;

View File

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Entities.Provider; using Bit.Core.Entities.Provider;
using Bit.Core.Enums; using Bit.Core.Enums;

View File

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

View File

@ -1,11 +1,12 @@
using Bit.Api.AdminConsole.Models.Request; using Bit.Api.AdminConsole.Models.Request;
using Bit.Api.AdminConsole.Models.Response; using Bit.Api.AdminConsole.Models.Response;
using Bit.Api.Models.Response; using Bit.Api.Models.Response;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Core.Services;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;

View File

@ -2,6 +2,7 @@
using Bit.Api.AdminConsole.Models.Response.Organizations; using Bit.Api.AdminConsole.Models.Response.Organizations;
using Bit.Api.Models.Request.Organizations; using Bit.Api.Models.Request.Organizations;
using Bit.Api.Models.Response; using Bit.Api.Models.Response;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;

View File

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

View File

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Core.AdminConsole.Models.Business;
using Bit.Core.Models.Business; using Bit.Core.Models.Business;
namespace Bit.Api.AdminConsole.Models.Request; namespace Bit.Api.AdminConsole.Models.Request;
@ -24,7 +25,7 @@ public class ImportOrganizationUsersRequestModel
{ {
var importedGroup = new ImportedGroup var importedGroup = new ImportedGroup
{ {
Group = new Core.Entities.Group Group = new Core.AdminConsole.Entities.Group
{ {
OrganizationId = organizationId, OrganizationId = organizationId,
Name = Name, Name = Name,

View File

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

View File

@ -2,8 +2,9 @@
using Bit.Api.AdminConsole.Public.Models.Request; using Bit.Api.AdminConsole.Public.Models.Request;
using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Api.AdminConsole.Public.Models.Response;
using Bit.Api.Models.Public.Response; using Bit.Api.Models.Public.Response;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;

View File

@ -2,6 +2,7 @@
using Bit.Api.AdminConsole.Public.Models.Request; using Bit.Api.AdminConsole.Public.Models.Request;
using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Api.AdminConsole.Public.Models.Response;
using Bit.Api.Models.Public.Response; using Bit.Api.Models.Public.Response;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Models.Business; using Bit.Core.Models.Business;
using Bit.Core.OrganizationFeatures.OrganizationUsers.Interfaces; using Bit.Core.OrganizationFeatures.OrganizationUsers.Interfaces;

View File

@ -1,5 +1,5 @@
using Bit.Api.Auth.Models.Public.Request; using Bit.Api.Auth.Models.Public.Request;
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
namespace Bit.Api.AdminConsole.Public.Models.Request; namespace Bit.Api.AdminConsole.Public.Models.Request;

View File

@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Models.Business;
using Bit.Core.Models.Business; using Bit.Core.Models.Business;
using Bit.Core.Utilities; using Bit.Core.Utilities;

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Api.Auth.Models.Public.Response; using Bit.Api.Auth.Models.Public.Response;
using Bit.Api.Models.Public.Response; using Bit.Api.Models.Public.Response;
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
namespace Bit.Api.AdminConsole.Public.Models.Response; namespace Bit.Api.AdminConsole.Public.Models.Response;

View File

@ -1,6 +1,7 @@
using Bit.Api.Models.Response; using Bit.Api.Models.Response;
using Bit.Api.SecretsManager.Models.Request; using Bit.Api.SecretsManager.Models.Request;
using Bit.Api.SecretsManager.Models.Response; using Bit.Api.SecretsManager.Models.Response;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;

View File

@ -1,4 +1,4 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Models.Api; using Bit.Core.Models.Api;
using Bit.Core.Models.Data.Organizations.OrganizationUsers; using Bit.Core.Models.Data.Organizations.OrganizationUsers;
using Bit.Core.SecretsManager.Entities; using Bit.Core.SecretsManager.Entities;

View File

@ -1,8 +1,9 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities;
using Bit.Core.Models; using Bit.Core.Models;
using Bit.Core.Utilities; using Bit.Core.Utilities;
namespace Bit.Core.Entities; namespace Bit.Core.AdminConsole.Entities;
public class Group : ITableObject<Guid>, IExternal public class Group : ITableObject<Guid>, IExternal
{ {

View File

@ -1,4 +1,4 @@
namespace Bit.Core.Entities; namespace Bit.Core.AdminConsole.Entities;
public class GroupUser public class GroupUser
{ {

View File

@ -1,6 +1,6 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
namespace Bit.Core.Models.Business; namespace Bit.Core.AdminConsole.Models.Business;
public class ImportedGroup public class ImportedGroup
{ {

View File

@ -1,7 +1,7 @@
using System.Data; using System.Data;
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
namespace Bit.Core.Models.Data; namespace Bit.Core.AdminConsole.Models.Data;
public class GroupWithCollections : Group public class GroupWithCollections : Group
{ {

View File

@ -1,16 +1,18 @@
using Bit.Core.Context; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Core.Services; using Bit.Core.Services;
using Bit.Core.Tools.Enums; using Bit.Core.Tools.Enums;
using Bit.Core.Tools.Models.Business; using Bit.Core.Tools.Models.Business;
using Bit.Core.Tools.Services; using Bit.Core.Tools.Services;
namespace Bit.Core.OrganizationFeatures.Groups; namespace Bit.Core.AdminConsole.OrganizationFeatures.Groups;
public class CreateGroupCommand : ICreateGroupCommand public class CreateGroupCommand : ICreateGroupCommand
{ {
@ -46,7 +48,7 @@ public class CreateGroupCommand : ICreateGroupCommand
await GroupRepositoryUpdateUsersAsync(group, users); await GroupRepositoryUpdateUsersAsync(group, users);
} }
await _eventService.LogGroupEventAsync(group, Enums.EventType.Group_Created); await _eventService.LogGroupEventAsync(group, Core.Enums.EventType.Group_Created);
} }
public async Task CreateGroupAsync(Group group, Organization organization, EventSystemUser systemUser, public async Task CreateGroupAsync(Group group, Organization organization, EventSystemUser systemUser,
@ -61,7 +63,7 @@ public class CreateGroupCommand : ICreateGroupCommand
await GroupRepositoryUpdateUsersAsync(group, users, systemUser); await GroupRepositoryUpdateUsersAsync(group, users, systemUser);
} }
await _eventService.LogGroupEventAsync(group, Enums.EventType.Group_Created, systemUser); await _eventService.LogGroupEventAsync(group, Core.Enums.EventType.Group_Created, systemUser);
} }
private async Task GroupRepositoryCreateGroupAsync(Group group, Organization organization, IEnumerable<CollectionAccessSelection> collections = null) private async Task GroupRepositoryCreateGroupAsync(Group group, Organization organization, IEnumerable<CollectionAccessSelection> collections = null)

View File

@ -1,11 +1,11 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories;
using Bit.Core.Services; using Bit.Core.Services;
namespace Bit.Core.OrganizationFeatures.Groups; namespace Bit.Core.AdminConsole.OrganizationFeatures.Groups;
public class DeleteGroupCommand : IDeleteGroupCommand public class DeleteGroupCommand : IDeleteGroupCommand
{ {

View File

@ -1,8 +1,9 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
namespace Bit.Core.OrganizationFeatures.Groups.Interfaces; namespace Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
public interface ICreateGroupCommand public interface ICreateGroupCommand
{ {

View File

@ -1,7 +1,7 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
namespace Bit.Core.OrganizationFeatures.Groups.Interfaces; namespace Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
public interface IDeleteGroupCommand public interface IDeleteGroupCommand
{ {

View File

@ -1,8 +1,9 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
namespace Bit.Core.OrganizationFeatures.Groups.Interfaces; namespace Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
public interface IUpdateGroupCommand public interface IUpdateGroupCommand
{ {

View File

@ -1,12 +1,14 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Core.Services; using Bit.Core.Services;
namespace Bit.Core.OrganizationFeatures.Groups; namespace Bit.Core.AdminConsole.OrganizationFeatures.Groups;
public class UpdateGroupCommand : IUpdateGroupCommand public class UpdateGroupCommand : IUpdateGroupCommand
{ {
@ -36,7 +38,7 @@ public class UpdateGroupCommand : IUpdateGroupCommand
await GroupRepositoryUpdateUsersAsync(group, userIds); await GroupRepositoryUpdateUsersAsync(group, userIds);
} }
await _eventService.LogGroupEventAsync(group, Enums.EventType.Group_Updated); await _eventService.LogGroupEventAsync(group, Core.Enums.EventType.Group_Updated);
} }
public async Task UpdateGroupAsync(Group group, Organization organization, EventSystemUser systemUser, public async Task UpdateGroupAsync(Group group, Organization organization, EventSystemUser systemUser,
@ -51,7 +53,7 @@ public class UpdateGroupCommand : IUpdateGroupCommand
await GroupRepositoryUpdateUsersAsync(group, userIds, systemUser); await GroupRepositoryUpdateUsersAsync(group, userIds, systemUser);
} }
await _eventService.LogGroupEventAsync(group, Enums.EventType.Group_Updated, systemUser); await _eventService.LogGroupEventAsync(group, Core.Enums.EventType.Group_Updated, systemUser);
} }
private async Task GroupRepositoryUpdateGroupAsync(Group group, IEnumerable<CollectionAccessSelection> collections = null) private async Task GroupRepositoryUpdateGroupAsync(Group group, IEnumerable<CollectionAccessSelection> collections = null)

View File

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

View File

@ -1,7 +1,7 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
namespace Bit.Core.Services; namespace Bit.Core.AdminConsole.Services;
public interface IGroupService public interface IGroupService
{ {

View File

@ -1,9 +1,12 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Core.Services;
namespace Bit.Core.Services; namespace Bit.Core.AdminConsole.Services.Implementations;
public class GroupService : IGroupService public class GroupService : IGroupService
{ {

View File

@ -1,8 +1,8 @@
using Bit.Core.AdminConsole.OrganizationAuth; using Bit.Core.AdminConsole.OrganizationAuth;
using Bit.Core.AdminConsole.OrganizationAuth.Interfaces; using Bit.Core.AdminConsole.OrganizationAuth.Interfaces;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Models.Business.Tokenables; using Bit.Core.Models.Business.Tokenables;
using Bit.Core.OrganizationFeatures.Groups;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.OrganizationFeatures.OrganizationApiKeys; using Bit.Core.OrganizationFeatures.OrganizationApiKeys;
using Bit.Core.OrganizationFeatures.OrganizationApiKeys.Interfaces; using Bit.Core.OrganizationFeatures.OrganizationApiKeys.Interfaces;
using Bit.Core.OrganizationFeatures.OrganizationCollections; using Bit.Core.OrganizationFeatures.OrganizationCollections;

View File

@ -1,4 +1,5 @@
using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs; using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Enums; using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Repositories; using Bit.Core.Auth.Repositories;
using Bit.Core.Context; using Bit.Core.Context;

View File

@ -1,4 +1,5 @@
#nullable enable #nullable enable
using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Utilities; using Bit.Core.Utilities;

View File

@ -1,4 +1,5 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider; using Bit.Core.Entities.Provider;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.SecretsManager.Entities; using Bit.Core.SecretsManager.Entities;

View File

@ -1,4 +1,5 @@
using System.Security.Claims; using System.Security.Claims;
using Bit.Core.AdminConsole.Models.Business;
using Bit.Core.Auth.Enums; using Bit.Core.Auth.Enums;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;

View File

@ -1,4 +1,5 @@
using Bit.Core.Context; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Context;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Entities.Provider; using Bit.Core.Entities.Provider;
using Bit.Core.Enums; using Bit.Core.Enums;

View File

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

View File

@ -1,4 +1,5 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities;
using Bit.Core.Entities.Provider; using Bit.Core.Entities.Provider;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.SecretsManager.Entities; using Bit.Core.SecretsManager.Entities;

View File

@ -1,13 +1,16 @@
using System.Data; using System.Data;
using System.Text.Json; using System.Text.Json;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Models.Data;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.Settings; using Bit.Core.Settings;
using Bit.Infrastructure.Dapper.Repositories;
using Dapper; using Dapper;
using Microsoft.Data.SqlClient; using Microsoft.Data.SqlClient;
namespace Bit.Infrastructure.Dapper.Repositories; namespace Bit.Infrastructure.Dapper.AdminConsole.Repositories;
public class GroupRepository : Repository<Group, Guid>, IGroupRepository public class GroupRepository : Repository<Group, Guid>, IGroupRepository
{ {

View File

@ -1,8 +1,10 @@
using Bit.Core.Auth.Repositories; using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Repositories;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Core.SecretsManager.Repositories; using Bit.Core.SecretsManager.Repositories;
using Bit.Core.Tools.Repositories; using Bit.Core.Tools.Repositories;
using Bit.Core.Vault.Repositories; using Bit.Core.Vault.Repositories;
using Bit.Infrastructure.Dapper.AdminConsole.Repositories;
using Bit.Infrastructure.Dapper.Auth.Repositories; using Bit.Infrastructure.Dapper.Auth.Repositories;
using Bit.Infrastructure.Dapper.Repositories; using Bit.Infrastructure.Dapper.Repositories;
using Bit.Infrastructure.Dapper.SecretsManager.Repositories; using Bit.Infrastructure.Dapper.SecretsManager.Repositories;

View File

@ -1,5 +1,6 @@
using System.Data; using System.Data;
using System.Text.Json; using System.Text.Json;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;

View File

@ -1,19 +1,21 @@
using AutoMapper; using AutoMapper;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Infrastructure.EntityFramework.Models; using Bit.Infrastructure.EntityFramework.Models;
using Bit.Infrastructure.EntityFramework.Repositories;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using AdminConsoleEntities = Bit.Core.AdminConsole.Entities;
namespace Bit.Infrastructure.EntityFramework.Repositories; namespace Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGroupRepository public class GroupRepository : Repository<AdminConsoleEntities.Group, Group, Guid>, IGroupRepository
{ {
public GroupRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper) public GroupRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
: base(serviceScopeFactory, mapper, (DatabaseContext context) => context.Groups) : base(serviceScopeFactory, mapper, (DatabaseContext context) => context.Groups)
{ } { }
public async Task CreateAsync(Core.Entities.Group obj, IEnumerable<CollectionAccessSelection> collections) public async Task CreateAsync(AdminConsoleEntities.Group obj, IEnumerable<CollectionAccessSelection> collections)
{ {
var grp = await base.CreateAsync(obj); var grp = await base.CreateAsync(obj);
using (var scope = ServiceScopeFactory.CreateScope()) using (var scope = ServiceScopeFactory.CreateScope())
@ -51,7 +53,7 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
} }
} }
public async Task<Tuple<Core.Entities.Group, ICollection<CollectionAccessSelection>>> GetByIdWithCollectionsAsync(Guid id) public async Task<Tuple<AdminConsoleEntities.Group, ICollection<CollectionAccessSelection>>> GetByIdWithCollectionsAsync(Guid id)
{ {
var grp = await base.GetByIdAsync(id); var grp = await base.GetByIdAsync(id);
using (var scope = ServiceScopeFactory.CreateScope()) using (var scope = ServiceScopeFactory.CreateScope())
@ -67,12 +69,12 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
ReadOnly = c.ReadOnly, ReadOnly = c.ReadOnly,
HidePasswords = c.HidePasswords, HidePasswords = c.HidePasswords,
}).ToList(); }).ToList();
return new Tuple<Core.Entities.Group, ICollection<CollectionAccessSelection>>( return new Tuple<AdminConsoleEntities.Group, ICollection<CollectionAccessSelection>>(
grp, collections); grp, collections);
} }
} }
public async Task<ICollection<Core.Entities.Group>> GetManyByOrganizationIdAsync(Guid organizationId) public async Task<ICollection<AdminConsoleEntities.Group>> GetManyByOrganizationIdAsync(Guid organizationId)
{ {
using (var scope = ServiceScopeFactory.CreateScope()) using (var scope = ServiceScopeFactory.CreateScope())
{ {
@ -81,11 +83,11 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
from g in dbContext.Groups from g in dbContext.Groups
where g.OrganizationId == organizationId where g.OrganizationId == organizationId
select g).ToListAsync(); select g).ToListAsync();
return Mapper.Map<List<Core.Entities.Group>>(data); return Mapper.Map<List<AdminConsoleEntities.Group>>(data);
} }
} }
public async Task<ICollection<Tuple<Core.Entities.Group, ICollection<CollectionAccessSelection>>>> public async Task<ICollection<Tuple<AdminConsoleEntities.Group, ICollection<CollectionAccessSelection>>>>
GetManyWithCollectionsByOrganizationIdAsync(Guid organizationId) GetManyWithCollectionsByOrganizationIdAsync(Guid organizationId)
{ {
var groups = await GetManyByOrganizationIdAsync(organizationId); var groups = await GetManyByOrganizationIdAsync(organizationId);
@ -100,7 +102,7 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
var collections = query.GroupBy(c => c.GroupId).ToList(); var collections = query.GroupBy(c => c.GroupId).ToList();
return groups.Select(group => return groups.Select(group =>
new Tuple<Core.Entities.Group, ICollection<CollectionAccessSelection>>( new Tuple<AdminConsoleEntities.Group, ICollection<CollectionAccessSelection>>(
group, group,
collections collections
.FirstOrDefault(c => c.Key == group.Id)? .FirstOrDefault(c => c.Key == group.Id)?
@ -115,7 +117,7 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
} }
} }
public async Task<ICollection<Core.Entities.Group>> GetManyByManyIds(IEnumerable<Guid> groupIds) public async Task<ICollection<AdminConsoleEntities.Group>> GetManyByManyIds(IEnumerable<Guid> groupIds)
{ {
using (var scope = ServiceScopeFactory.CreateScope()) using (var scope = ServiceScopeFactory.CreateScope())
{ {
@ -124,11 +126,11 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
where groupIds.Contains(g.Id) where groupIds.Contains(g.Id)
select g; select g;
var groups = await query.ToListAsync(); var groups = await query.ToListAsync();
return Mapper.Map<List<Core.Entities.Group>>(groups); return Mapper.Map<List<AdminConsoleEntities.Group>>(groups);
} }
} }
public async Task<ICollection<Core.Entities.GroupUser>> GetManyGroupUsersByOrganizationIdAsync(Guid organizationId) public async Task<ICollection<AdminConsoleEntities.GroupUser>> GetManyGroupUsersByOrganizationIdAsync(Guid organizationId)
{ {
using (var scope = ServiceScopeFactory.CreateScope()) using (var scope = ServiceScopeFactory.CreateScope())
{ {
@ -140,7 +142,7 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
where g.OrganizationId == organizationId where g.OrganizationId == organizationId
select gu; select gu;
var groupUsers = await query.ToListAsync(); var groupUsers = await query.ToListAsync();
return Mapper.Map<List<Core.Entities.GroupUser>>(groupUsers); return Mapper.Map<List<AdminConsoleEntities.GroupUser>>(groupUsers);
} }
} }
@ -172,7 +174,7 @@ public class GroupRepository : Repository<Core.Entities.Group, Group, Guid>, IGr
} }
} }
public async Task ReplaceAsync(Core.Entities.Group group, IEnumerable<CollectionAccessSelection> requestedCollections) public async Task ReplaceAsync(AdminConsoleEntities.Group group, IEnumerable<CollectionAccessSelection> requestedCollections)
{ {
await base.ReplaceAsync(group); await base.ReplaceAsync(group);
using (var scope = ServiceScopeFactory.CreateScope()) using (var scope = ServiceScopeFactory.CreateScope())

View File

@ -1,9 +1,11 @@
using Bit.Core.Auth.Repositories; using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Auth.Repositories;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Core.SecretsManager.Repositories; using Bit.Core.SecretsManager.Repositories;
using Bit.Core.Tools.Repositories; using Bit.Core.Tools.Repositories;
using Bit.Core.Vault.Repositories; using Bit.Core.Vault.Repositories;
using Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
using Bit.Infrastructure.EntityFramework.Auth.Repositories; using Bit.Infrastructure.EntityFramework.Auth.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories; using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.SecretsManager.Repositories; using Bit.Infrastructure.EntityFramework.SecretsManager.Repositories;

View File

@ -2,7 +2,7 @@
namespace Bit.Infrastructure.EntityFramework.Models; namespace Bit.Infrastructure.EntityFramework.Models;
public class Group : Core.Entities.Group public class Group : Core.AdminConsole.Entities.Group
{ {
public virtual Organization Organization { get; set; } public virtual Organization Organization { get; set; }
public virtual ICollection<GroupUser> GroupUsers { get; set; } public virtual ICollection<GroupUser> GroupUsers { get; set; }
@ -12,6 +12,6 @@ public class GroupMapperProfile : Profile
{ {
public GroupMapperProfile() public GroupMapperProfile()
{ {
CreateMap<Core.Entities.Group, Group>().ReverseMap(); CreateMap<Core.AdminConsole.Entities.Group, Group>().ReverseMap();
} }
} }

View File

@ -2,7 +2,7 @@
namespace Bit.Infrastructure.EntityFramework.Models; namespace Bit.Infrastructure.EntityFramework.Models;
public class GroupUser : Core.Entities.GroupUser public class GroupUser : Core.AdminConsole.Entities.GroupUser
{ {
public virtual Group Group { get; set; } public virtual Group Group { get; set; }
public virtual OrganizationUser OrganizationUser { get; set; } public virtual OrganizationUser OrganizationUser { get; set; }
@ -12,7 +12,7 @@ public class GroupUserMapperProfile : Profile
{ {
public GroupUserMapperProfile() public GroupUserMapperProfile()
{ {
CreateMap<Core.Entities.GroupUser, GroupUser>().ReverseMap(); CreateMap<Core.AdminConsole.Entities.GroupUser, GroupUser>().ReverseMap();
} }
} }

View File

@ -3,6 +3,8 @@ using System.Reflection;
using System.Security.Claims; using System.Security.Claims;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using AspNetCoreRateLimit; using AspNetCoreRateLimit;
using Bit.Core.AdminConsole.Services;
using Bit.Core.AdminConsole.Services.Implementations;
using Bit.Core.Auth.Enums; using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Identity; using Bit.Core.Auth.Identity;
using Bit.Core.Auth.IdentityServer; using Bit.Core.Auth.IdentityServer;

View File

@ -1,9 +1,11 @@
using Bit.Api.AdminConsole.Controllers; using Bit.Api.AdminConsole.Controllers;
using Bit.Api.AdminConsole.Models.Request; using Bit.Api.AdminConsole.Models.Request;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes; using Bit.Test.Common.AutoFixture.Attributes;

View File

@ -1,10 +1,12 @@
using Bit.Api.AdminConsole.Public.Controllers; using Bit.Api.AdminConsole.Public.Controllers;
using Bit.Api.AdminConsole.Public.Models.Request; using Bit.Api.AdminConsole.Public.Models.Request;
using Bit.Api.AdminConsole.Public.Models.Response; using Bit.Api.AdminConsole.Public.Models.Response;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.Groups.Interfaces;
using Bit.Core.Repositories; using Bit.Core.Repositories;
using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes; using Bit.Test.Common.AutoFixture.Attributes;

View File

@ -2,8 +2,9 @@
using Bit.Api.SecretsManager.Controllers; using Bit.Api.SecretsManager.Controllers;
using Bit.Api.SecretsManager.Models.Request; using Bit.Api.SecretsManager.Models.Request;
using Bit.Api.Test.SecretsManager.Enums; using Bit.Api.Test.SecretsManager.Enums;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Context; using Bit.Core.Context;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Repositories; using Bit.Core.Repositories;

View File

@ -1,9 +1,10 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.Groups;
using Bit.Core.Repositories;
using Bit.Core.Services; using Bit.Core.Services;
using Bit.Core.Test.AutoFixture.OrganizationFixtures; using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Tools.Enums; using Bit.Core.Tools.Enums;
@ -15,7 +16,7 @@ using Bit.Test.Common.Helpers;
using NSubstitute; using NSubstitute;
using Xunit; using Xunit;
namespace Bit.Core.Test.OrganizationFeatures.Groups; namespace Bit.Core.Test.AdminConsole.OrganizationFeatures.Groups;
[SutProviderCustomize] [SutProviderCustomize]
public class CreateGroupCommandTests public class CreateGroupCommandTests

View File

@ -1,8 +1,8 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.OrganizationFeatures.Groups;
using Bit.Core.Repositories;
using Bit.Core.Services; using Bit.Core.Services;
using Bit.Core.Test.AutoFixture.OrganizationFixtures; using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture;
@ -10,7 +10,7 @@ using Bit.Test.Common.AutoFixture.Attributes;
using NSubstitute; using NSubstitute;
using Xunit; using Xunit;
namespace Bit.Core.Test.OrganizationFeatures.Groups; namespace Bit.Core.Test.AdminConsole.OrganizationFeatures.Groups;
[SutProviderCustomize] [SutProviderCustomize]
public class DeleteGroupCommandTests public class DeleteGroupCommandTests
@ -42,7 +42,7 @@ public class DeleteGroupCommandTests
{ {
sutProvider.GetDependency<IGroupRepository>() sutProvider.GetDependency<IGroupRepository>()
.GetByIdAsync(groupId) .GetByIdAsync(groupId)
.Returns(new Core.Entities.Group .Returns(new Group
{ {
Id = groupId, Id = groupId,
OrganizationId = Guid.NewGuid() OrganizationId = Guid.NewGuid()

View File

@ -1,9 +1,10 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Groups;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Models.Data; using Bit.Core.Models.Data;
using Bit.Core.OrganizationFeatures.Groups;
using Bit.Core.Repositories;
using Bit.Core.Services; using Bit.Core.Services;
using Bit.Core.Test.AutoFixture.OrganizationFixtures; using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture;
@ -12,7 +13,7 @@ using Bit.Test.Common.Helpers;
using NSubstitute; using NSubstitute;
using Xunit; using Xunit;
namespace Bit.Core.Test.OrganizationFeatures.Groups; namespace Bit.Core.Test.AdminConsole.OrganizationFeatures.Groups;
[SutProviderCustomize] [SutProviderCustomize]
public class UpdateGroupCommandTests public class UpdateGroupCommandTests

View File

@ -1,4 +1,7 @@
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.AdminConsole.Services.Implementations;
using Bit.Core.Entities;
using Bit.Core.Enums; using Bit.Core.Enums;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;
using Bit.Core.Repositories; using Bit.Core.Repositories;
@ -9,7 +12,7 @@ using Bit.Test.Common.AutoFixture.Attributes;
using NSubstitute; using NSubstitute;
using Xunit; using Xunit;
namespace Bit.Core.Test.Services; namespace Bit.Core.Test.AdminConsole.Services;
[SutProviderCustomize] [SutProviderCustomize]
[OrganizationCustomize(UseGroups = true)] [OrganizationCustomize(UseGroups = true)]

View File

@ -1,6 +1,7 @@
using System.Text.Json; using System.Text.Json;
using AutoFixture; using AutoFixture;
using AutoFixture.Kernel; using AutoFixture.Kernel;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.Auth.Enums; using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Models; using Bit.Core.Auth.Models;
using Bit.Core.Entities; using Bit.Core.Entities;

View File

@ -1,4 +1,5 @@
using Bit.Core.Context; using Bit.Core.AdminConsole.Entities;
using Bit.Core.Context;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Entities.Provider; using Bit.Core.Entities.Provider;
using Bit.Core.Enums; using Bit.Core.Enums;

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers; namespace Bit.Infrastructure.EFIntegration.Test.AdminConsole.Repositories.EqualityComparers;
public class GroupCompare : IEqualityComparer<Group> public class GroupCompare : IEqualityComparer<Group>
{ {

View File

@ -1,7 +1,8 @@
using AutoFixture; using AutoFixture;
using AutoFixture.Kernel; using AutoFixture.Kernel;
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays; using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories; using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes; using Bit.Test.Common.AutoFixture.Attributes;

View File

@ -1,7 +1,7 @@
using AutoFixture; using AutoFixture;
using AutoFixture.Kernel; using AutoFixture.Kernel;
using Bit.Core.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Infrastructure.EntityFramework.Repositories; using Bit.Infrastructure.EntityFramework.AdminConsole.Repositories;
using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes; using Bit.Test.Common.AutoFixture.Attributes;