1 write to AllowedRoles
Microsoft.AspNetCore.Authorization (1)
RolesAuthorizationRequirement.cs (1)
30AllowedRoles = allowedRoles;
9 references to AllowedRoles
Microsoft.AspNetCore.Authorization (2)
RolesAuthorizationRequirement.cs (2)
49foreach (var role in requirement.AllowedRoles) 69var roles = $"User.IsInRole must be true for one of the following roles: ({string.Join("|", AllowedRoles)})";
Microsoft.AspNetCore.Authorization.Test (6)
AuthorizationPolicyFacts.cs (6)
111Assert.Equal(2, rolesAuthorizationRequirement.AllowedRoles.Count()); 112Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r1")); 113Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r2")); 172Assert.Equal(2, rolesAuthorizationRequirement.AllowedRoles.Count()); 173Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r1")); 174Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r2"));
Microsoft.AspNetCore.Components.Authorization.Tests (1)
AuthorizeViewTest.cs (1)
450((RolesAuthorizationRequirement)req).AllowedRoles));