web.sitemap :
<siteMapNode title="Edit Squad" url="Admin/EditSquad.aspx"
description="Edit the players in the squad"
roles="Reporter,Owner"/>
Admin/web.config :
<location path="EditSquad.aspx">
<system.web>
<authorization>
<allow roles="Reporter" />
</authorization>
</system.web>
</location>
结果: 作为Reporter登陆,Admin/EditSquad.aspx链接和内容均可见。
若: web.sitemap : roles="Owner"/> ,作为Reporter登陆,链接和内容仍均可见。
若: Admin/web.config :<allow roles="Owner" />,作为Reporter登陆,仅链接可见。
若: web.sitemap : roles="Owner"/> ,Admin/web.config :<allow roles="Owner" /> ,作为Reporter登陆,链接和内容仍均不可见。
<siteMapNode title="Edit Squad" url="Admin/EditSquad.aspx"
description="Edit the players in the squad"
roles="Reporter,Owner"/>
Admin/web.config :
<location path="EditSquad.aspx">
<system.web>
<authorization>
<allow roles="Reporter" />
</authorization>
</system.web>
</location>
结果: 作为Reporter登陆,Admin/EditSquad.aspx链接和内容均可见。
若: web.sitemap : roles="Owner"/> ,作为Reporter登陆,链接和内容仍均可见。
若: Admin/web.config :<allow roles="Owner" />,作为Reporter登陆,仅链接可见。
若: web.sitemap : roles="Owner"/> ,Admin/web.config :<allow roles="Owner" /> ,作为Reporter登陆,链接和内容仍均不可见。
浙公网安备 33010602011771号