Re: roleProvider and Windows Authentication
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 05/23/05
- Previous message: ManniAT: "Re: roleProvider and Windows Authentication"
- Maybe in reply to: Mark Parter: "roleProvider and Windows Authentication"
- Next in thread: Mark Parter: "Re: roleProvider and Windows Authentication"
- Reply: Mark Parter: "Re: roleProvider and Windows Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: microsoft.public.dotnet.framework.aspnet.security Date: Sun, 22 May 2005 21:11:47 -0700
Enable security trimming in web.config and use the authorization element - you have to authorize anyway - then use the role attribute in the sitemap file - if you want to show the links regardless of authorization.
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Thanks, that did the treat for the "broken" siteMapPath :)
So, if I want to restrict/hide say, the 'Edit Register" menu item, do I add
a roles attribute to the node in the siteMap or add an authorization element
to the web.config file, or both?
Thanks again.
"ManniAT" wrote:
> Hi Mark,
>
> as I take a close look to your sitemap I found the following:
> <siteMapNode title="Registers" url="" description="">
> <siteMapNode title="New Register" url="~/registers/newregwiz.aspx"
> description="Create a new register based upon an issued reigster template" />
> <siteMapNode title="Edit Register" url="~/registers/editregister.aspx"
> description="Edit an existing register" />
> <siteMapNode title="Load Register" url="~/registers/loadregister.aspx"
> description="Load a Register for editing" SecurityTrimmingEnabled="true"
> roles="ARS_Administrators" />
> <siteMapNode title="Quick Register Entry" url="~/registers/qregentry.aspx"
> description="Quickly update a register" />
> <siteMapNode title="Register Entry" url="~/registers/regentry.aspx"
> description="Update a register" />
> <siteMapNode title="Register History" url="~/registers/reghist.aspx"
> description="Show the history of a register" />
> </siteMapNode>
>
> Try to Change this to:
> <siteMapNode roles="*" title="Registers" url="" description="Everyone sees">
> <siteMapNode title="New Register" url="~/registers/newregwiz.aspx"
> description="Create a new register based upon an issued reigster template" />
> <siteMapNode title="Edit Register" url="~/registers/editregister.aspx"
> description="Edit an existing register" />
> <siteMapNode title="Load Register" url="~/registers/loadregister.aspx"
> description="Load a Register for editing" />
> <siteMapNode title="Quick Register Entry" url="~/registers/qregentry.aspx"
> description="Quickly update a register" />
> <siteMapNode title="Register Entry" url="~/registers/regentry.aspx"
> description="Update a register" />
> <siteMapNode title="Register History" url="~/registers/reghist.aspx"
> description="Show the history of a register" />
> </siteMapNode>
>
> What did I change??
> Firts I added roles="*" to the first line.
> Then I removed (not needed) the roles="ARS_Administrators" from another node.
>
> Assume the following (I state - not very clear - in my post before):
> If a node has no URL the system can't decide if this node is enabled for a specific role.
> Default==not visible -- this means (and I did here) you have to enter the appropriate roles to such a node.
> ---
> If a node has an URL the system can decide what roles are allowed to see this node.
> I prefer to leave roles out in this case - because when I make changes to the access rules,
> thei are reflected automaticly in the siteMap.
>
> So give this slightly changed siteMap a chance :-)
>
> HTH
>
> Manfred
>
>
>
[microsoft.public.dotnet.framework.aspnet.security]
- Previous message: ManniAT: "Re: roleProvider and Windows Authentication"
- Maybe in reply to: Mark Parter: "roleProvider and Windows Authentication"
- Next in thread: Mark Parter: "Re: roleProvider and Windows Authentication"
- Reply: Mark Parter: "Re: roleProvider and Windows Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|