1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00
bitwarden-server/test/Core.Test
Rui Tomé 6514b342fc
[PM-10316] Add Command to Remove User and Delete Data for Organization-Managed Users (#4726)
* Add HasVerifiedDomainsAsync method to IOrganizationDomainService

* Add GetManagedUserIdsByOrganizationIdAsync method to IOrganizationUserRepository and the corresponding queries

* Fix case on the sproc OrganizationUser_ReadManagedIdsByOrganizationId parameter

* Update the EF query to use the Email from the User table

* dotnet format

* Fix IOrganizationDomainService.HasVerifiedDomainsAsync by checking that domains have been Verified and add unit tests

* Rename IOrganizationUserRepository.GetManagedUserIdsByOrganizationAsync

* Fix domain queries

* Add OrganizationUserRepository integration tests

* Add summary to IOrganizationDomainService.HasVerifiedDomainsAsync

* chore: Rename IOrganizationUserRepository.GetManagedUserIdsByOrganizationAsync to GetManyIdsManagedByOrganizationIdAsync

* Add IsManagedByAnyOrganizationAsync method to IUserRepository

* Add integration tests for UserRepository.IsManagedByAnyOrganizationAsync

* Refactor to IUserService.IsManagedByAnyOrganizationAsync and IOrganizationService.GetUsersOrganizationManagementStatusAsync

* chore: Refactor IsManagedByAnyOrganizationAsync method in UserService

* Refactor IOrganizationService.GetUsersOrganizationManagementStatusAsync to return IDictionary<Guid, bool>

* Extract IOrganizationService.GetUsersOrganizationManagementStatusAsync into a query

* Update comments in OrganizationDomainService to use proper capitalization

* Move OrganizationDomainService to AdminConsole ownership and update namespace

* feat: Add support for organization domains in enterprise plans

* feat: Add HasOrganizationDomains property to OrganizationAbility class

* refactor: Update GetOrganizationUsersManagementStatusQuery to use IApplicationCacheService

* Remove HasOrganizationDomains and use UseSso to check if Organization can have Verified Domains

* Refactor UserService.IsManagedByAnyOrganizationAsync to simply check the UseSso flag

* Add new event types for organization user deletion and voluntary departure

* Add DeleteManagedOrganizationUserAccountCommand to remove user and delete account

* Refactor DeleteManagedOrganizationUserAccountCommand to use orgUser.Id instead of orgUser.UserId.Value

* Add DeleteManagedOrganizationUserAccountCommandTests

* Remove duplicate sql migration script

* Update DeleteManagedOrganizationUserAccountCommand methods to cover all existing checks on OrganizationService

* Add unit tests for all user checks

* Refactor DeleteManagedOrganizationUserAccountCommand

* Set nullable enable annotation on DeleteManagedOrganizationUserAccountCommand

* Fix possible null reference

* Refactor DeleteManagedOrganizationUserAccountCommand.cs for improved event logging

* Use UserRepository.GetByIdAsync instead of UserService.GetUserByIdAsync

* Refactor DeleteManagedOrganizationUserAccountCommand.cs for improved error messages

* Refactor DeleteManagedOrganizationUserAccountCommand.cs for improved event logging, error handling and reduce database calls

* Rename unit tests to correctly describe expected outcome
2024-09-25 11:02:17 +01:00
..
AdminConsole [PM-10316] Add Command to Remove User and Delete Data for Organization-Managed Users (#4726) 2024-09-25 11:02:17 +01:00
Auth Auth/PM-11969 - Registration with Email Verification - Accept Emergency Access Invite Flow (#4773) 2024-09-12 19:39:10 -04:00
AutoFixture [AC-2646] Remove FC MVP dead code from Core (#4281) 2024-07-12 12:25:04 -05:00
Billing [AC-2568] Added invoices and transaction history endpoints. Added cursor paging for each (#4692) 2024-09-09 09:38:58 -04:00
Entities [AC-1283] AC Team code ownership moves: Organization (pt 2) (#3486) 2023-11-29 15:31:15 -06:00
Helpers Run formatting (#2230) 2022-08-29 16:06:55 -04:00
Models [PM-11667] Remove all code related to the outdated custom permissions 'Edit/Delete Assigned Collections' (#4736) 2024-09-10 15:06:13 +01:00
OrganizationFeatures F4E validation (#4690) 2024-08-22 15:10:03 +00:00
Resources Run formatting (#2230) 2022-08-29 16:06:55 -04:00
SecretsManager [SM-654] Individual secret permissions (#4160) 2024-06-20 12:45:28 -05:00
Services [PM-10311] Account Management: Create helper methods for checking against verified domains (#4636) 2024-09-11 11:29:57 +01:00
Tokens Run formatting (#2230) 2022-08-29 16:06:55 -04:00
Tools Replace async void with async Task (#3835) 2024-02-22 11:59:08 -05:00
Utilities Add AuthorizeOrThrowAsync extension method (#4790) 2024-09-23 08:45:14 +10:00
Vault [AC-2881] Remove Organization.FlexibleCollections from code (#4552) 2024-07-26 15:07:33 +10:00
ConstantsTests.cs [PM-3565] Enforce higher minimum KDF (#3304) 2023-12-05 17:21:46 +01:00
Core.Test.csproj Remove moq (#3166) 2023-08-10 17:03:42 +02:00
TempDirectory.cs Run formatting (#2230) 2022-08-29 16:06:55 -04:00