Re: IsInRole vs Demand
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 06/22/05
- Next message: zachg99_at_gmail.com: "Re: .NET SSL Client creation with Mentalis.org libraries"
- Previous message: Martin.McDonald_at_us.logicalis.com: "IsInRole vs Demand"
- In reply to: Martin.McDonald_at_us.logicalis.com: "IsInRole vs Demand"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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.
- Next message: zachg99_at_gmail.com: "Re: .NET SSL Client creation with Mentalis.org libraries"
- Previous message: Martin.McDonald_at_us.logicalis.com: "IsInRole vs Demand"
- In reply to: Martin.McDonald_at_us.logicalis.com: "IsInRole vs Demand"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|