[x] I have verified that I am running the latest version of Nancy
[x] I have verified if the problem exist in both DEBUG and RELEASE mode
[x] I have searched open and closed issues to ensure it has not already been reported
Description
Former RequiresClaims(...) could be used for a list of roles of a user.
In Nancy 2.x,, this function checks the claims of the Security.ClaimsPrincipal.
However, this ClaimsPrincipal also offers a check for roles directly (user.IsInRole). This property of a user should be leveraged for Nancy Modules: this.requiresRole(string role), or similar.
Steps to Reproduce
System Configuration
Nancy version: 2.0
Nancy host
[x] Nancy.Hosting.Aspnet
[ ] Nancy.Hosting.Self
[ ] Nancy.Owin ()
[ ] Other:
Other Nancy packages and versions:
Environment (Operating system, version and so on):
Prerequisites
DEBUG
andRELEASE
modeDescription
Former RequiresClaims(...) could be used for a list of roles of a user. In Nancy 2.x,, this function checks the claims of the Security.ClaimsPrincipal.
However, this ClaimsPrincipal also offers a check for roles directly (user.IsInRole). This property of a user should be leveraged for Nancy Modules: this.requiresRole(string role), or similar.
Steps to Reproduce
System Configuration