SiteMapNode.Roles 属性

定义

获取或设置与对象关联的角色的集合,这些 SiteMapNode 角色在安全修整期间使用。

public:
 property System::Collections::IList ^ Roles { System::Collections::IList ^ get(); void set(System::Collections::IList ^ value); };
public System.Collections.IList Roles { get; set; }
member this.Roles : System.Collections.IList with get, set
Public Property Roles As IList

属性值

角色 IList

例外

节点是只读的。

注解

如果启用了安全修整,站点地图提供程序将生成当前用户能够查看的节点的节点树,部分取决于当前用户分配的角色是否包含在集合中 Roles 。 URL 授权和文件授权还用于确定用户是否有权访问 SiteMapNode 对象。 有关授权的详细信息,请参阅 ASP.NET Authorization

首次创建该构造函数时,可以使用 SiteMapNode 构造函数向 SiteMapNode 对象提供角色列表。

适用于

另请参阅