Fixing the build break on the new startup

This commit is contained in:
Praburaj 2014-09-02 11:30:10 -07:00
parent 49ba8ce9ac
commit bf7a8c2439
1 changed files with 2 additions and 1 deletions

View File

@ -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.
var identity = (ClaimsIdentity)context.User.Identity;
#if NET451
if (identity.GetUserName() == Environment.UserDomainName + "\\" + Environment.UserName)
{
identity.AddClaim(new Claim("ManageStore", "Allowed"));
}
#endif
await next.Invoke();
});