Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugBash] Prevent AAD to MSA account transformation #5492

Merged
merged 9 commits into from
Feb 16, 2018
Merged

Conversation

shishirx34
Copy link
Contributor

Fixes: #5445. Simple refactoring.

var user = GetCurrentUser();
var userHasAADCredential = user?.Credentials.Any(c => CredentialTypes.IsAzureActiveDirectoryAccount(c.Type));

if (userHasAADCredential.HasValue && userHasAADCredential.Value)
Copy link
Member

Choose a reason for hiding this comment

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

Could simplify to:

var aadCredential = user.Credentials.GetAzureActiveDirectoryCredential();
if (aadCredential != null) { ... }

@shishirx34 shishirx34 merged commit ccead7a into dev Feb 16, 2018
@shishirx34 shishirx34 deleted the block-aad2msa branch May 1, 2018 19:41
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