我想限制对特定 url 的访问,除非用户是 2 个不同角色的成员。在这种情况下,如果用户同时具有报告和存档角色,我只想授予对此 url 的访问权限。有没有办法在 ASP.net 中做到这一点?
<location path="testpage.aspx">
<system.web>
<authorization>
<allow roles="Reporting, Archiving"/>
<deny users="*"/>
</authorization>
</system.web>
我想要这样的东西:
<location path="testpage.aspx">
<system.web>
<authorization>
<allow roles="Reporting & Archiving"/>
<deny users="*"/>
</authorization>
</system.web>