-
Notifications
You must be signed in to change notification settings - Fork 374
fix: do not require multiple sign ins for tenant selection #6628
Conversation
beyackle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny thing, but otherwise this looks great.
extensions/azurePublish/src/components/azureProvisionDialog.tsx
Outdated
Show resolved
Hide resolved
extensions/azurePublish/src/components/azureProvisionDialog.tsx
Outdated
Show resolved
Hide resolved
| const getDefaultFormData = (currentProfile, defaults) => { | ||
| return { | ||
| choice: defaults.choice ?? 'create', | ||
| tenantId: currentProfile?.tenantId ?? defaults.tenantId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably overthinking this, but I noticed that you clear the other fields when the tenantId changes. Here, this chooses between the profile tenant and the default. If we choose one or the other, would we want to use all the tenant-bound values from that choice? (i.e. I choose the profile tenantId and so I want to choose the subscriptionId from the profile and not the default?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could actually just be tenantId: currentProfile?.tenantId because we won't ever set the tenant id with the defaults.
extensions/azurePublish/src/components/azureProvisionDialog.tsx
Outdated
Show resolved
Hide resolved
| @@ -1,4 +1,5 @@ | |||
| process.env.DEBUG = 'composer*'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tonyanziano I removed this. Was it there for a good reason? Just trying to cut down on the noise in the test output!
…#6628) * make dropdown width same as dropdown element * do not require sign in every time fetching tenants * open dev tools after the app is ready * do not populate dropdowns if token is null * hide tenant selection when tokens are user provided * rename method for clarity * refactor how form data is used * make seeding form data more resiliant * fix issue where page was not set correctly * allow publishing from web * store tenant id in publish profiles for token based users * add test for using cached tenant token * disable resource group downdop for existing profiles * remove useless if statement * Fix function name * update name for clarity * remove default tenant id * add isGetTokensFromUser for compatibility with 3p extensions * revert lint-staged config Co-authored-by: Ben Yackley <61990921+beyackle@users.noreply.github.com> Co-authored-by: Chris Whitten <christopherwhitten@gmail.com> Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Description
Task Item
fixes #6595
fixes #6614