WindowsIdentity instead of principal

This commit is contained in:
Pranav K 2016-10-28 15:37:03 -07:00
parent d864418083
commit 8d896613bf
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ namespace MusicStore
// administrator. But this can be changed to suit the needs.
var identity = (ClaimsIdentity)context.User.Identity;
if (context.User.Identity.Name == WindowsPrincipal.Current.Identity.Name)
if (context.User.Identity.Name == WindowsIdentity.GetCurrent().Name)
{
identity.AddClaim(new Claim("ManageStore", "Allowed"));
}