Ask a Question related to ASP.NET Security, Design and Development.
-
Arthur Dent #1
Require multiple role membership?
Is there any way in the web.config "allow roles" authorization section, to
AND the roles together?
Eg. in my app, i have roles Customer, Employee, and Admininstrator. Now,
there could be Admin employees, and Admin Customers, each with access to
different sections.
Is there a way to specifiy that you can only get into the folder "AppAdmin"
if you are in role Employee AND role Administrator?
As ive seen it before, the roles by default only OR together.
Thanks in advance,
- Arthur Dent
Arthur Dent Guest
-
Getting Group Membership
Hi, I'm trying to do something that I think should be pretty easy, take the user who is authenticated with the application (intranet application/... -
#25782 [Opn->Bgs]: require( 'require.php' ) crashing Apache 1.3.28
ID: 25782 Updated by: sniper@php.net Reported By: akinder at technology-x dot com -Status: Open +Status: ... -
#25782 [Fbk->Opn]: require( 'require.php' ) crashing Apache 1.3.28
ID: 25782 User updated by: akinder at technology-x dot com Reported By: akinder at technology-x dot com -Status: ... -
#25782 [Opn->Fbk]: require( 'require.php' ) crashing Apache 1.3.28
ID: 25782 Updated by: sniper@php.net Reported By: akinder at technology-x dot com -Status: Open +Status: ... -
#25782 [NEW]: require( 'require.php' ) crashing Apache 1.3.28
From: akinder at technology-x dot com Operating system: Linux RedHat 9 PHP version: 5.0.0b1 (beta1) PHP Bug Type: Apache... -
Joe Kaplan \(MVP - ADSI\) #2
Re: Require multiple role membership?
I don't think you can do this via web.config. You could do this
programmatically with IsInRole calls, but that is extra work.
Another way around this might be to create "AND" roles when you do your role
mapping, so that you have a special role like EmployeeANDAdminstrator that
you could then use in web.config.
HTH,
Joe K.
"Arthur Dent" <hitchhikersguideto-news@yahoo.com> wrote in message
news:%23NgJ4Ks3EHA.404@TK2MSFTNGP10.phx.gbl...> Is there any way in the web.config "allow roles" authorization section, to
> AND the roles together?
> Eg. in my app, i have roles Customer, Employee, and Admininstrator. Now,
> there could be Admin employees, and Admin Customers, each with access to
> different sections.
> Is there a way to specifiy that you can only get into the folder
> "AppAdmin" if you are in role Employee AND role Administrator?
> As ive seen it before, the roles by default only OR together.
>
> Thanks in advance,
> - Arthur Dent
>
Joe Kaplan \(MVP - ADSI\) Guest
-
Arthur Dent #3
Re: Require multiple role membership?
Yeah, thats what im doing at the moment... i have my roles defined in an
enum, and as additional members of the enum i have my combined roles, then i
check those names (i use System.Enum.GetName() to define my role names). Eg.
Enum UserRoles
Employee = 2
Administrator = 4
AdminEmployee = Employee Or Administrator
End Enum
Then in my allow role i add AdminEmployee.
I just thought maybe there was a way to do this without creating combinatory
values like that.
Thanks!
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
in message news:O9eOf%23s3EHA.2788@TK2MSFTNGP15.phx.gbl...>I don't think you can do this via web.config. You could do this
>programmatically with IsInRole calls, but that is extra work.
>
> Another way around this might be to create "AND" roles when you do your
> role mapping, so that you have a special role like EmployeeANDAdminstrator
> that you could then use in web.config.
>
> HTH,
>
> Joe K.
>
> "Arthur Dent" <hitchhikersguideto-news@yahoo.com> wrote in message
> news:%23NgJ4Ks3EHA.404@TK2MSFTNGP10.phx.gbl...>>> Is there any way in the web.config "allow roles" authorization section,
>> to AND the roles together?
>> Eg. in my app, i have roles Customer, Employee, and Admininstrator. Now,
>> there could be Admin employees, and Admin Customers, each with access to
>> different sections.
>> Is there a way to specifiy that you can only get into the folder
>> "AppAdmin" if you are in role Employee AND role Administrator?
>> As ive seen it before, the roles by default only OR together.
>>
>> Thanks in advance,
>> - Arthur Dent
>>
>
Arthur Dent Guest



Reply With Quote

