T
Tim Mackey
hi,
User.IsInRole method appears not to work with the web.sitemap * 'all roles'
wildcard. is this by design? do i have to handle wildcards manually?
ideally User.IsInRole("*") would return true if the user is in any role. an
example is below to illustrate.
i have a sitemap node like so:
<siteMapNode title="Report xyz" description="etc" url="Reports.aspx?sp=XYZ"
roles="*">
since i'm using the querystring to specify a sproc, i make sure to verify
that the user is allowed to access it, as defined in web.sitemap. so i have
code in Reports.aspx that goes like:
foreach (string role in siteMapNode.Roles)
if (User.IsInRole(role))
return; // OK
thanks for any help
tim
User.IsInRole method appears not to work with the web.sitemap * 'all roles'
wildcard. is this by design? do i have to handle wildcards manually?
ideally User.IsInRole("*") would return true if the user is in any role. an
example is below to illustrate.
i have a sitemap node like so:
<siteMapNode title="Report xyz" description="etc" url="Reports.aspx?sp=XYZ"
roles="*">
since i'm using the querystring to specify a sproc, i make sure to verify
that the user is allowed to access it, as defined in web.sitemap. so i have
code in Reports.aspx that goes like:
foreach (string role in siteMapNode.Roles)
if (User.IsInRole(role))
return; // OK
thanks for any help
tim