I have restricted the the access for the role "AdminUser" in the Access viewer as above. Later in the code when I am accessing using the below code
try
{
if (Sitecore.Security.Accounts.User.Exists(@"Sitecore\AdminUser"))
{
isAuthenticated = Sitecore.Security.Authentication.AuthenticationManager.Login(@"Sitecore\AdminUser", true);
}
}
It is authenticating the user and I am able to see the user role in the Sitecore.Context.User.Roles as "Admin User"
But when we access the Page it loads well and fine. Is there a way I can stop the user with Role "AdminUser" from accessing the page
Note: I am not accessing the item from Sitecore but as a webpage.