Re: User.IsInRole with * wildcard, web.sitemap etc.



On Jul 9, 7:20 pm, "Tim Mackey" <tim.mac...@xxxxxxxxxxxxxxxx> wrote:
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

Tim, it makes no sense to worry about (*). If you have roles="*" then
you don't need to check anything, because any role is ok.

.



Relevant Pages

  • Re: Comics, Was Re: Volume 3 Available Monday
    ... > I heard a story once, the truth of which I've never been able to verify - ... > the story of a library built at a prestigious ivy league college that ... work has two interesting design flaws: ... from the resistive heating from computers. ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Testing FIR filter design
    ... and you are trying to verify those numbers ... operation to implement a generic FIR filter whose response entirely ... Surely now i got interest to learn about the design more than ... To verify if an apple is "sweet" we can use tongue sensor ...
    (comp.dsp)
  • Import problems
    ... >>xls. ... anyone know if this is a know bug? ... >I can verify at least that this is not your imagination. ... empty the table and then I design the fields in the new ...
    (microsoft.public.access.externaldata)
  • Re: Any way to check for pending vwait/tkwait?
    ... The program's design is such that there could be ... Then you may be sensitive to the beauty of one single vwait. ... verify X ... ... array unset done ...
    (comp.lang.tcl)
  • Re: Testing FIR filter design
    ... Without learning resources i am not blindly designing a FIR ... resources about the FIR filter design and verification... ... To verify if an apple is "sweet" we can use tongue sensor ... What "property" of of a filter is important in your design? ...
    (comp.dsp)