1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00
bitwarden-server/test/Api.Test
Rui Tomé 4b76008245
[PM-11406] Account Management: Prevent a verified user from deleting their account (#4878)
* Add check for managed user before purging account

* Rename IOrganizationRepository.GetByClaimedUserDomainAsync to GetByVerifiedUserEmailDomainAsync and refactor to return a list. Remove ManagedByOrganizationId from ProfileResponseMode. Add ManagesActiveUser to ProfileOrganizationResponseModel

* Rename the property ManagesActiveUser to UserIsManagedByOrganization

* Remove whole class #nullable enable and add it to specific places

* [PM-11405] Account Deprovisioning: Prevent a verified user from changing their email address

* Remove unnecessary .ToList()

* Refactor IUserService methods GetOrganizationsManagingUserAsync and IsManagedByAnyOrganizationAsync to not return nullable objects. Update ProfileOrganizationResponseModel.UserIsManagedByOrganization to not be nullable

* Prevent deletion of accounts managed by an organization when Account Deprovisioning is enabled

* Add CannotDeleteManagedAccountViewModel and email templates

- Added CannotDeleteManagedAccountViewModel class to handle emails related to preventing deletion of accounts managed by an organization.
- Added HTML and text email templates for sending notifications about the inability to delete an account owned by an organization.
- Updated IMailService interface with a new method to send the cannot delete managed account email.
- Implemented the SendCannotDeleteManagedAccountEmailAsync method in HandlebarsMailService.
- Added a check in UserService to send the cannot delete managed account email if the user is managed by any organization.
- Added a no-op implementation for SendCannotDeleteManagedAccountEmailAsync in NoopMailService.

* Update error message when unable to purge vault for managed account

* Update error message when unable to change email for managed account

* Update error message when unable to delete account when managed by organization

* Update error message in test for deleting organization-owned accounts
2024-11-04 16:37:21 +00:00
..
AdminConsole [PM-10323] Remove user verification from organization user deletion methods (#4965) 2024-11-04 14:48:13 +00:00
Auth [PM-11406] Account Management: Prevent a verified user from deleting their account (#4878) 2024-11-04 16:37:21 +00:00
Billing [PM-14365][Defect] Member of trialing org cannot log in app (#4968) 2024-11-04 15:15:27 +01:00
Controllers [PM-13730] Return Policy object instead of NotFoundException (#4911) 2024-10-28 12:33:22 -04:00
Models/Request/Accounts [PM-3565] Enforce higher minimum KDF (#3304) 2023-12-05 17:21:46 +01:00
SecretsManager PM-11123: Device Type mapping (#4768) 2024-09-23 23:02:32 +02:00
Tools [PM-517] Added validation to maximum and minimum expiry date (#4199) 2024-06-21 13:56:43 +01:00
Utilities [PM-8830] Billing Enums Rename (#4180) 2024-06-14 15:34:47 -04:00
Vault Split Organization.LimitCollectionCreationDeletion into two separate business rules (#4730) 2024-10-18 11:00:01 -04:00
Api.Test.csproj Support for passkey registration (#2885) 2023-10-30 09:40:06 -04:00