Skip to content

[#114730201][#114888193] Automation for selecting subscription and tenant in authentication scenarios#1949

Merged
hovsepm merged 6 commits intoAzure:devfrom
haocs:mock
Mar 16, 2016
Merged

[#114730201][#114888193] Automation for selecting subscription and tenant in authentication scenarios#1949
hovsepm merged 6 commits intoAzure:devfrom
haocs:mock

Conversation

@haocs
Copy link
Copy Markdown

@haocs haocs commented Mar 15, 2016

No description provided.

@haocs haocs changed the title Mock [#114730201][#114888193] Automation for selecting subscription and tenant in authentication scenarios Mar 15, 2016
{
newTenant = tempTenant;
newSubscription = tempSubscription;
if (tempSubscription == null && i + 1 < tenants.Count())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the empty bock. You can invert the if to work for one case. Doesn't this work?

If( tempSubscription != null || i == (tenants.Count() -1) ) 

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, this will change the logic of selecting the tenants. Now if tenant does not have any subscription - Last tenant will be selected. Somewhere in the code we say that "First subscription will be selected"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hovsepm

  • yes.
  • To keep the tenant selecting order, how about iterating tenants in a reverse fashion? Personally, I don't think "first tenant/subscription" makes much sense here if tenants are not sorted(or sorted alphabetically).

@markcowl
Copy link
Copy Markdown
Member

@azuresdkci add to whitelist

hovsepm pushed a commit that referenced this pull request Mar 16, 2016
[#114730201][#114888193] Automation for selecting subscription and tenant in authentication scenarios
@hovsepm hovsepm merged commit f330472 into Azure:dev Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants