mirror of
https://github.com/bitwarden/server
synced 2025-12-16 16:23:31 +00:00
Allow managers to create self-assigned collections (#1672)
This commit is contained in:
@@ -121,8 +121,11 @@ namespace Bit.Api.Controllers
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
var assignUserToCollection = !(await _currentContext.EditAnyCollection(orgIdGuid)) &&
|
||||
await _currentContext.EditAssignedCollections(orgIdGuid);
|
||||
|
||||
await _collectionService.SaveAsync(collection, model.Groups?.Select(g => g.ToSelectionReadOnly()),
|
||||
!await _currentContext.ViewAllCollections(orgIdGuid) ? _currentContext.UserId : null);
|
||||
assignUserToCollection ? _currentContext.UserId : null);
|
||||
return new CollectionResponseModel(collection);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user