WindowsIdentity instead of principal
This commit is contained in:
parent
d864418083
commit
8d896613bf
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue