1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

[AC-1331] Remove Manager role - final (#4493)

* Remove OrganizationUserType.Manager

* Add EnumDataType validation to prevent invalid enum values
This commit is contained in:
Thomas Rittson
2024-07-12 06:13:10 +10:00
committed by GitHub
parent d2567dd42d
commit 7fe4fe16cb
14 changed files with 6 additions and 108 deletions

View File

@ -61,11 +61,6 @@ public class UpdateOrganizationUserCommand : IUpdateOrganizationUserCommand
// If the organization is using Flexible Collections, prevent use of any deprecated permissions
var organization = await _organizationRepository.GetByIdAsync(user.OrganizationId);
if (organization.FlexibleCollections && user.Type == OrganizationUserType.Manager)
{
throw new BadRequestException("The Manager role has been deprecated by collection enhancements. Use the collection Can Manage permission instead.");
}
if (organization.FlexibleCollections && user.AccessAll)
{
throw new BadRequestException("The AccessAll property has been deprecated by collection enhancements. Assign the user to collections instead.");