SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru Raskolnikov's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    606
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Customizing Content Via RoleGroups

    Hey guys,

    I have been following the process to set up roles for Users, admin, sub admins, etc. for my site using the 4GuysFromRolla process.

    I have one menu that is wrapped in a <div> for everyone. but i want a second menu to be available to admins. I can use LoggedInTemplate to make the menu viewable by logged in users, but to be able to add a second menu for admins is turning out to not work for me.

    I am trying to use RoleGroups. this is great if all you need to do is have different text, but you can not put <div> tags inside of a role group. and you also can't put rolegroups inside of a loggedInTemplate tag.

    what am i missing here?

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,625
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Just use the ASP.NET sitemap stuff and setup the proper security on your pages. Menus get magically security trimmed and life continues.

  3. #3
    SitePoint Guru Raskolnikov's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    606
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so i should stay away from role groups completely?

  4. #4
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,625
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    No, you should use Roles. But rather than doing a second menu for the role types, just use the security trimming in a single menu. Make sense?

  5. #5
    SitePoint Wizard
    Join Date
    Feb 2007
    Posts
    1,274
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What wwb is saying is that when you use roles and proper declarative authorization in web.config files and/or location elements, any menu will be automagically "security trimmed". Any url to which the actual user does not have access will be culled from the menu.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •