mirror of
https://github.com/bitwarden/server
synced 2025-12-16 16:23:31 +00: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