Fixing the build break on the new startup
This commit is contained in:
parent
49ba8ce9ac
commit
bf7a8c2439
|
|
@ -45,11 +45,12 @@ namespace MusicStore
|
||||||
//Who will get admin access? For demo sake I'm listing the currently logged on user as the application administrator. But this can be changed to suit the needs.
|
//Who will get admin access? For demo sake I'm listing the currently logged on user as the application administrator. But this can be changed to suit the needs.
|
||||||
var identity = (ClaimsIdentity)context.User.Identity;
|
var identity = (ClaimsIdentity)context.User.Identity;
|
||||||
|
|
||||||
|
#if NET451
|
||||||
if (identity.GetUserName() == Environment.UserDomainName + "\\" + Environment.UserName)
|
if (identity.GetUserName() == Environment.UserDomainName + "\\" + Environment.UserName)
|
||||||
{
|
{
|
||||||
identity.AddClaim(new Claim("ManageStore", "Allowed"));
|
identity.AddClaim(new Claim("ManageStore", "Allowed"));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
await next.Invoke();
|
await next.Invoke();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue