5 instantiations of OperationAuthorizationRequirement
BasicWebSite (1)
Operations.cs (1)
10
public static OperationAuthorizationRequirement Edit = new
OperationAuthorizationRequirement
{ Name = "Edit" };
Microsoft.AspNetCore.Authorization.Test (4)
DefaultAuthorizationServiceTests.cs (3)
803
public static OperationAuthorizationRequirement Edit = new
OperationAuthorizationRequirement
{ Name = "Edit" };
804
public static OperationAuthorizationRequirement Create = new
OperationAuthorizationRequirement
{ Name = "Create" };
805
public static OperationAuthorizationRequirement Delete = new
OperationAuthorizationRequirement
{ Name = "Delete" };
OperationAuthorizationRequirementTests.cs (1)
12
return new
OperationAuthorizationRequirement
()
22 references to OperationAuthorizationRequirement
BasicWebSite (3)
ManagerHandler.cs (2)
9
public class ManagerHandler : AuthorizationHandler<
OperationAuthorizationRequirement
>
11
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context,
OperationAuthorizationRequirement
requirement)
Operations.cs (1)
10
public static
OperationAuthorizationRequirement
Edit = new OperationAuthorizationRequirement { Name = "Edit" };
Microsoft.AspNetCore.Authorization (1)
OperationAuthorizationRequirement.cs (1)
20
return $"{nameof(
OperationAuthorizationRequirement
)}:Name={Name}";
Microsoft.AspNetCore.Authorization.Test (18)
DefaultAuthorizationServiceTests.cs (16)
803
public static
OperationAuthorizationRequirement
Edit = new OperationAuthorizationRequirement { Name = "Edit" };
804
public static
OperationAuthorizationRequirement
Create = new OperationAuthorizationRequirement { Name = "Create" };
805
public static
OperationAuthorizationRequirement
Delete = new OperationAuthorizationRequirement { Name = "Delete" };
808
public class ExpenseReportAuthorizationHandler : AuthorizationHandler<
OperationAuthorizationRequirement
, ExpenseReport>
810
public ExpenseReportAuthorizationHandler(IEnumerable<
OperationAuthorizationRequirement
> authorized)
815
private readonly IEnumerable<
OperationAuthorizationRequirement
> _allowed;
817
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context,
OperationAuthorizationRequirement
requirement, ExpenseReport resource)
827
public class SuperUserHandler : AuthorizationHandler<
OperationAuthorizationRequirement
>
829
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context,
OperationAuthorizationRequirement
requirement)
845
services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new
OperationAuthorizationRequirement
[] { Operations.Edit }));
863
public class NotCalledHandler : AuthorizationHandler<
OperationAuthorizationRequirement
, string>
865
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context,
OperationAuthorizationRequirement
requirement, string resource)
871
public class EvenHandler : AuthorizationHandler<
OperationAuthorizationRequirement
, int>
873
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context,
OperationAuthorizationRequirement
requirement, int id)
931
services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new
OperationAuthorizationRequirement
[] { Operations.Edit }));
948
services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new
OperationAuthorizationRequirement
[] { Operations.Edit }));
OperationAuthorizationRequirementTests.cs (2)
10
private
OperationAuthorizationRequirement
CreateRequirement(string name)
22
var
requirement = CreateRequirement("Custom");