Re: IsInRole vs Demand

From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 06/22/05


Date: Wed, 22 Jun 2005 12:40:53 -0700

Hello Martin.McDonald@us.logicalis.com,

internally PrincipalPermission calls IsInRole on Thread.CurrentPrincipal
and if false is returned, a SecurityException is thrown.

So it is really just a matter of taste.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Hello, I'm trying to determine the difference between using
> IPrincipal.IsInRole and PrincipalPermission.Demand. About the only
> thing I can think of is that "Demand" allows a bit more flexibility
> because it's constructor allows name/role, name/null, null/role.
> Plus,
> it allows for the Union of more than one permission.
> Are those the only differences, or am I missing more? Thanks for your
> input.



Relevant Pages

  • These days, go deliver a report!
    ... I'll emphasise long or Katherine will taste the halfs. ... Iman's figure develops until our monster after we endure no matter how it. ... hardly mere, so I extract you. ... hard productions can list globally, ...
    (sci.crypt)
  • Re: Further B5:TLT update from jms
    ... The phrase "it's a matter of taste" is neutral, ... There are all kinds on usenet. ... Eddie: Out of the kitchen? ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Oyster mushrooms
    ... >> seafood no matter what they taste like, ... >> highly unlikely to cause anything serious no matter what ... > proteins or colourings in fake crab meat. ...
    (alt.support.diabetes)
  • Re: Bug/Gross InEfficiency in HeathFields fgetline program
    ... Not everything is a matter of taste, ... unindented code is error prone, mis indented code is even worse, and ... My point is that it does not matter so much whether strncpy is a "string ...
    (comp.lang.c)
  • Re: Bug/Gross InEfficiency in HeathFields fgetline program
    ... Not everything is a matter of taste, ... unindented code is error prone, mis indented code is even worse, and easy ... or what formal definition for "string functions" the ...
    (comp.lang.c)