Skip to content

Commit cea646d

Browse files
authored
[Blazor] AuthorizeView - Roles+Policy together (#35297)
1 parent a5b9fd4 commit cea646d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

aspnetcore/blazor/security/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,8 @@ To handle the case where the user must satisfy several policies simultaneously,
12301230

12311231
Claims-based authorization is a special case of policy-based authorization. For example, you can define a policy that requires users to have a certain claim. For more information, see <xref:security/authorization/policies>.
12321232

1233+
If both <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Roles> and <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Policy> are set, authorization succeeds only when both conditions are satisfied. That is, the user must belong to at least one of the specified roles *and* meet the requirements defined by the policy.
1234+
12331235
If neither <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Roles> nor <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView.Policy> is specified, <xref:Microsoft.AspNetCore.Components.Authorization.AuthorizeView> uses the default policy:
12341236

12351237
* Authenticated (signed-in) users are authorized.

0 commit comments

Comments
 (0)