You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It is possible (in a .NET Core console app anyway) for the current principal/identity to be null. In this case the IsInRole and IsNotInRole rules throw a null reference exception instead of a security exception.
Describe the solution you'd like
I think the expected behavior is for these rules to throw security exceptions if the principal/identity is null, since the user is clearly not in the required role.
Or actually I suppose IsNotInRole should return true (no exception) because the null user is clearly not in the specified (any) role.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It is possible (in a .NET Core console app anyway) for the current principal/identity to be null. In this case the
IsInRole
andIsNotInRole
rules throw a null reference exception instead of a security exception.Describe the solution you'd like
I think the expected behavior is for these rules to throw security exceptions if the principal/identity is null, since the user is clearly not in the required role.
Or actually I suppose
IsNotInRole
should return true (no exception) because the null user is clearly not in the specified (any) role.The text was updated successfully, but these errors were encountered: