[x] I have provided test coverage for my change (where applicable)
Description
As the ClaimsPrincipal offers a function user.HasClaim, Nancy provides a hook to check if a claim is present (RequiresClaims, RequiresAnyClaim).
However, this did not exist for roles: While the ClaimsPrincipal offers user.IsInRole(), Nancy does not leverage that for modules.
This PR extends the Module hooks with the two documented functions RequiresAnyRole(string[] requiredRoles) and RequiresRoles(string[] requiredRoles).
This facilitates the check for roles when entering routes drastically.
... RequiresAnyRole(string[] roles)
This relates directly to #2981 and a bit also to #1190
Prerequisites
Description
As the ClaimsPrincipal offers a function user.HasClaim, Nancy provides a hook to check if a claim is present (RequiresClaims, RequiresAnyClaim). However, this did not exist for roles: While the ClaimsPrincipal offers user.IsInRole(), Nancy does not leverage that for modules.
This PR extends the Module hooks with the two documented functions RequiresAnyRole(string[] requiredRoles) and RequiresRoles(string[] requiredRoles).
This facilitates the check for roles when entering routes drastically.
Tests are also included in this PR.