mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 05:00:19 -05:00
Switched from .Any to Count. Remove unreachable code. (#5519)
This commit is contained in:
parent
db3151160a
commit
f6cc140fde
@ -127,9 +127,9 @@ public class CiphersController : Controller
|
|||||||
public async Task<ListResponseModel<CipherDetailsResponseModel>> Get()
|
public async Task<ListResponseModel<CipherDetailsResponseModel>> Get()
|
||||||
{
|
{
|
||||||
var user = await _userService.GetUserByPrincipalAsync(User);
|
var user = await _userService.GetUserByPrincipalAsync(User);
|
||||||
var hasOrgs = _currentContext.Organizations?.Any() ?? false;
|
var hasOrgs = _currentContext.Organizations.Count != 0;
|
||||||
// TODO: Use hasOrgs proper for cipher listing here?
|
// TODO: Use hasOrgs proper for cipher listing here?
|
||||||
var ciphers = await _cipherRepository.GetManyByUserIdAsync(user.Id, withOrganizations: true || hasOrgs);
|
var ciphers = await _cipherRepository.GetManyByUserIdAsync(user.Id, withOrganizations: true);
|
||||||
Dictionary<Guid, IGrouping<Guid, CollectionCipher>> collectionCiphersGroupDict = null;
|
Dictionary<Guid, IGrouping<Guid, CollectionCipher>> collectionCiphersGroupDict = null;
|
||||||
if (hasOrgs)
|
if (hasOrgs)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user