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

Require user to verify email to use file Send (#1262)

This commit is contained in:
Thomas Rittson
2021-04-08 06:42:12 +10:00
committed by GitHub
parent 0366c0efef
commit c1ceeace95

View File

@ -316,7 +316,12 @@ namespace Bit.Core.Services
var user = await _userRepository.GetByIdAsync(send.UserId.Value);
if (!await _userService.CanAccessPremium(user))
{
throw new BadRequestException("You must have premium status to use file sends.");
throw new BadRequestException("You must have premium status to use file Sends.");
}
if (!user.EmailVerified)
{
throw new BadRequestException("You must confirm your email to use file Sends.");
}
if (user.Premium)