an ASP.NET Open Source CMS & eCommerce platform
Search:
Last Post 12/24/2009 6:35:42 AM By lukezy. 4 replies.
12/23/2009 8:00:11 AM
Applied
Posts: 93
Joined: 9/18/2009
Restrict Page by Role
Did I see somewhere that pages and/or page content can be restricted by role?
 
12/23/2009 4:10:48 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Restrict Page by Role
What kind of pages are you talking about? Admin pages, articles, blogs or forums or dymamic pages created by Admin -> Content -> Pages?
DotShoppingCart Staff
12/24/2009 12:40:04 AM
Applied
Posts: 93
Joined: 9/18/2009
Re: Restrict Page by Role
Any page added by admin, for example as general content, and yes, possibly even to restrict the ability to purchase via checkout or access a blog..
 
So if a member of a certain group logs in they see special pages whereas all other users do not.
 
12/24/2009 4:08:34 AM
Applied
Posts: 93
Joined: 9/18/2009
Re: Restrict Page by Role

I noticed that Admin.Master.cs performs

IsUserInRoles(SiteMap.CurrentNode["allowedRoles"])

 

 Is Web.Sitemap supposed to be updated manually to add "allowedRoles = 'Role1,Role2...' in order to allow or deny access to specific pages? 

 

12/24/2009 6:35:42 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Restrict Page by Role
Yes, you can use allowedRoles for admin pages. Check this thread for more information. For the pages in articles and forums you use permission grid when you do editing. We don't have a way to restrict dynamic pages which are defined for pulic access. However you can restrict it to logged in users.
DotShoppingCart Staff