Closed idan-h closed 2 years ago
Yes, that would be useful.
You should add the method into the PermissionChecks static class and add a test(s) in the TestPermissionChecker.
@JonPSmith Tried adding to that class, but couldn't because it depends on asp.net core.
Added in
Test.UnitTests.TestAuthPermissionsAspNetCore.TestPermissionPolicy
and
AuthPermissions.AspNetCore.PolicyCode.PermissionExtensions
instead
Hi @idan-h,
Yes, that was the correct thing to add it to the AuthPermissions.AspNetCore.PolicyCode
namespace. I'm not planning a release straight away as I have a few other things to do.
Hey, I wrote small piece of code to handle the
HasPermission
attribute fluently for minimal api.Usage:
Extension method:
Which namespace you would like this method to go into? I think people who use minimal api might find it useful