PageConventionCollectionExtensions.AuthorizeAreaFolder 方法

定义

重载

AuthorizeAreaFolder(PageConventionCollection, String, String, String)

对于指定文件夹下的所有页面,需要具有指定策略的授权。

AuthorizeAreaFolder(PageConventionCollection, String, String)

需要对指定文件夹下的所有页面使用默认策略进行授权。

AuthorizeAreaFolder(PageConventionCollection, String, String, String)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

对于指定文件夹下的所有页面,需要具有指定策略的授权。

public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaFolder (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string folderPath, string policy);
static member AuthorizeAreaFolder : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizeAreaFolder (conventions As PageConventionCollection, areaName As String, folderPath As String, policy As String) As PageConventionCollection

参数

areaName
String

区域名称。

folderPath
String

文件夹路径,例如 /Manage/

文件夹路径是文件夹的路径,相对于指定区域的页根目录。 例如,文件 Areas/Identity/Pages/Manage/Accounts.cshtml 的文件夹路径为 /Manage

policy
String

授权策略。

返回

PageConventionCollection

适用于

AuthorizeAreaFolder(PageConventionCollection, String, String)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

需要对指定文件夹下的所有页面使用默认策略进行授权。

public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaFolder (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string folderPath);
static member AuthorizeAreaFolder : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizeAreaFolder (conventions As PageConventionCollection, areaName As String, folderPath As String) As PageConventionCollection

参数

areaName
String

区域名称。

folderPath
String

文件夹路径,例如 /Manage/

文件夹路径是文件夹的路径,相对于指定区域的页根目录。 例如,文件 Areas/Identity/Pages/Manage/Accounts.cshtml 的文件夹路径为 /Manage

返回

PageConventionCollection

适用于