1
0
mirror of https://github.com/bitwarden/server synced 2025-12-19 09:43:25 +00:00

only get collection info when in an org

This commit is contained in:
Kyle Spearrin
2017-11-24 09:28:38 -05:00
parent a956b826cd
commit 0502ba2451
3 changed files with 21 additions and 9 deletions

View File

@@ -58,9 +58,8 @@ namespace Bit.Api.Controllers
var folders = await _folderRepository.GetManyByUserIdAsync(user.Id);
var ciphers = await _cipherRepository.GetManyByUserIdAsync(user.Id);
IEnumerable<Collection> collections = new List<Collection>();
IDictionary<Guid, IGrouping<Guid, CollectionCipher>> collectionCiphersGroupDict =
new Dictionary<Guid, IGrouping<Guid, CollectionCipher>>();
IEnumerable<Collection> collections = null;
IDictionary<Guid, IGrouping<Guid, CollectionCipher>> collectionCiphersGroupDict = null;
if(organizationUserDetails.Any(o => o.Enabled))
{
collections = await _collectionRepository.GetManyByUserIdAsync(user.Id, false);