1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Add error message if revoked user tries to accept invite (#2241)

This commit is contained in:
Thomas Rittson 2022-09-08 07:54:58 +10:00 committed by GitHub
parent edcac759eb
commit c085f5d49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1376,6 +1376,11 @@ public class OrganizationService : IOrganizationService
private async Task<OrganizationUser> AcceptUserAsync(OrganizationUser orgUser, User user,
IUserService userService)
{
if (orgUser.Status == OrganizationUserStatusType.Revoked)
{
throw new BadRequestException("Your organization access has been revoked.");
}
if (orgUser.Status != OrganizationUserStatusType.Invited)
{
throw new BadRequestException("Already accepted.");