Skip to content

Commit

Permalink
Fix issue with new getSubscriptions filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
MRayermannMSFT committed Feb 3, 2025
1 parent 241fee7 commit 2adec5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 4.1.1 - 2025-02-03

* Fix `VSCodeAzureSubscriptionProvider` implementation of `getSubscriptions` filtering returned subscriptions by `getSubscriptionFilters()` when the `filter` parameter is a `GetSubscriptionsFilter` object.

## 4.1.0 - 2025-01-31

* Add filtering `getSubscriptions` by a specific account and/or tenant.
Expand Down
2 changes: 1 addition & 1 deletion auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@microsoft/vscode-azext-azureauth",
"author": "Microsoft Corporation",
"version": "4.1.0",
"version": "4.1.1",
"description": "Azure authentication helpers for Visual Studio Code",
"tags": [
"azure",
Expand Down
2 changes: 1 addition & 1 deletion auth/src/VSCodeAzureSubscriptionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class VSCodeAzureSubscriptionProvider extends vscode.Disposable implement
subscriptions.sort((a, b) => a.name.localeCompare(b.name));

const subscriptionIds = await this.getSubscriptionFilters();
if (filter && !!subscriptionIds.length) { // If the list is empty it is treated as "no filter"
if (filter === true && !!subscriptionIds.length) { // If the list is empty it is treated as "no filter"
return sortSubscriptions(
uniqueSubscriptions.filter(sub => subscriptionIds.includes(sub.subscriptionId))
);
Expand Down

0 comments on commit 2adec5c

Please sign in to comment.