mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Defect/SG-825 - users in org w/ no personal vault still see personal vault (disabled org policies now still apply) (#2429)
* SG-825 - Policy_ReadByUserId stored proc now pulls back policies of disabled orgs * SG-825 - SyncController - Always retrieve policies -- even if orgs are disabled. * SG-825 - EF - PolicyReadByUserId - autoformat to remove whitespace and pass eslint build error
This commit is contained in:
@ -74,13 +74,13 @@ public class SyncController : Controller
|
||||
|
||||
IEnumerable<CollectionDetails> collections = null;
|
||||
IDictionary<Guid, IGrouping<Guid, CollectionCipher>> collectionCiphersGroupDict = null;
|
||||
IEnumerable<Policy> policies = null;
|
||||
IEnumerable<Policy> policies = await _policyRepository.GetManyByUserIdAsync(user.Id);
|
||||
|
||||
if (hasEnabledOrgs)
|
||||
{
|
||||
collections = await _collectionRepository.GetManyByUserIdAsync(user.Id);
|
||||
var collectionCiphers = await _collectionCipherRepository.GetManyByUserIdAsync(user.Id);
|
||||
collectionCiphersGroupDict = collectionCiphers.GroupBy(c => c.CipherId).ToDictionary(s => s.Key);
|
||||
policies = await _policyRepository.GetManyByUserIdAsync(user.Id);
|
||||
}
|
||||
|
||||
var userTwoFactorEnabled = await _userService.TwoFactorIsEnabledAsync(user);
|
||||
|
Reference in New Issue
Block a user