Last post Aug 04, 2009 11:19 PM by jcb871
Jun 11, 2009 02:59 PM|redwoodbev|LINK
Hi. My clubsite is online now, thanks to help from this forum. I would like to be able to restrict access to events and maybe some other pages by roles. Right now it looks like there are three roles, Administrators, Members(anyone logged in) and Guests
(anyone not logged in). I'm familiar with how the classified starterkit controls access by using roles in the sitemap file. That doesn't seem to work with the clubsite. Would someone point me in the right direction to limit access to pages based on user
status or roles?
Club Starter Kit
Jun 11, 2009 03:26 PM|bullpit|LINK
Are these pages in a separate folder or under the root folder directly? Sitemap trimming only hides the links to the pages in the menu, it won't prohibit access to the secured pages. You have to apply some sort of restriction separately. You can do that
by <location> tag in web.config file like this:
<allow roles="Administrators, Users"/>
Jun 11, 2009 04:21 PM|redwoodbev|LINK
Thank you so much. That worked like a charm! Bev
Jun 11, 2009 04:24 PM|bullpit|LINK
You are welcome.
Aug 04, 2009 11:19 PM|jcb871|LINK
Thank you a lot for that code... :)
I need tyo show some message when the user is not authorized to view the page.
Now it automatically redirects to login page.
Thanks for help :)