Skip to content

aad: new command 'az ad user update'#9297

Merged
tjprescott merged 6 commits intoAzure:devfrom
yugangw-msft:updateuser
Jul 16, 2019
Merged

aad: new command 'az ad user update'#9297
tjprescott merged 6 commits intoAzure:devfrom
yugangw-msft:updateuser

Conversation

@yugangw-msft
Copy link
Copy Markdown
Contributor

@yugangw-msft yugangw-msft commented May 2, 2019

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

  • I adhere to the Command Guidelines.

@yugangw-msft yugangw-msft requested a review from marstr May 2, 2019 23:51
@yugangw-msft
Copy link
Copy Markdown
Contributor Author

@limingu @adewaleo , can one of you take a look?

@tjprescott tjprescott requested a review from limingu May 7, 2019 15:34
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a better name for this argument? Why not simply have options_list=['--upn', '--object-id']... or break it out into two arguments with distinct help text? My gut tells me we shouldn't have "or" in our argument names.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But I can see the sdk function is using that as a parameter in the code below.
client.update(upn_or_object_id=upn_or_object_id, parameters=update_parameters)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the named used by SDK, but we should not have exposed it through az ad user show. Since the name has been out there for 2 years, breaking it right now might be a stretch. For better usability, I can add --id as another option, this will get us the consistency across app, sp, and user. Also upn is a logical id for a user, so --id is a right term.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can add the split options and deprecate the one with or in it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But I can see the sdk function is using that as a parameter in the code below.
client.update(upn_or_object_id=upn_or_object_id, parameters=update_parameters)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can check if the older user1 name is not valid any more. Will something like below will do the check
self.check("length([?displayName=='{user1}'])", 0),

@tjprescott
Copy link
Copy Markdown
Member

@yugangw-msft what's the deal with this? Is it still legitimate?

@yugangw-msft
Copy link
Copy Markdown
Contributor Author

@tjprescott, the PR is still legit. I have addressed your review feedback, can you please take a look?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should add the new alias to --id from the deprecated option.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@tjprescott tjprescott added this to the Sprint 66 milestone Jul 15, 2019
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.

3 participants