diff --git a/src/MusicStore/StartupNtlmAuthentication.cs b/src/MusicStore/StartupNtlmAuthentication.cs index ed399b4773..54bab90eff 100644 --- a/src/MusicStore/StartupNtlmAuthentication.cs +++ b/src/MusicStore/StartupNtlmAuthentication.cs @@ -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(); });