private async Task <bool> UserCanEditAsync(Cipher cipher, Guid userId) { if (!cipher.OrganizationId.HasValue && cipher.UserId.HasValue && cipher.UserId.Value == userId) { return(true); } return(await _cipherRepository.GetCanEditByIdAsync(userId, cipher.Id)); }