mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
user null checks for unauthorized
This commit is contained in:
@ -115,6 +115,11 @@ namespace Bit.Api.Controllers
|
||||
public async Task Accept(string orgId, string id, [FromBody]OrganizationUserAcceptRequestModel model)
|
||||
{
|
||||
var user = await _userService.GetUserByPrincipalAsync(User);
|
||||
if(user == null)
|
||||
{
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
|
||||
var result = await _organizationService.AcceptUserAsync(new Guid(id), user, model.Token);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user