Requiring Multiple Roles in Web.config Authorization
        Posted  
        
            by Derek Morrison
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Derek Morrison
        
        
        
        Published on 2010-04-29T15:01:45Z
        Indexed on 
            2010/04/29
            15:07 UTC
        
        
        Read the original article
        Hit count: 706
        
Is it possible to specify that multiple roles are required inside the authorization element of the web.config file? I currently have this block in one web.config of my site for a specific directory:
<authorization>  
    <allow roles="Global, Region" />
    <deny users="*" />
</authorization>
I've just identified a special case where a person with two lower-level permissions than Global and Region should also have access to this directory. Roughly, I want something like this:
<authorization>  
    <allow roles="GlobalManager, RegionManager, SiteManager && FooSite" />
    <deny users="*" />
</authorization>
Any ideas? I realize I probably should have a new role for this scenario, but I'd like to avoid that. Thanks!
© Stack Overflow or respective owner