This project is read-only.

Trouble Restricting Admin Access for Roles

Topics: ASP.NET 2.0, Business Logic Layer
Jan 8, 2008 at 9:20 PM
Edited Jan 8, 2008 at 9:24 PM
I've created a new role called "Guests" and I would only like that roll to be able to create posts and edit their own posts. For some reason, I can't get the Admin Extensions panel to be hidden from the role. I was able to add and remove different Admin sections through the ~/admin/Pages/web.config file but not for the Extensions portion. Any suggestions?

I'm able to remove the item in the code by adding this line to the BindMenu() function in Menu.ascx.cs:

if (adminNode.Title == "Extensions" && HttpContext.Current.User.IsInRole("Guests"))

But I don't like modifying admin code since it will get wiped out when I update blogEngine