TagHelperPack icon indicating copy to clipboard operation
TagHelperPack copied to clipboard

AuthZ: Not Authorized By Policy

Open dahlbyk opened this issue 2 years ago • 1 comments

I recently encountered a situation where I wanted to show something if the user doesn't satisfy a policy, e.g.

<button class="btn" asp-authz-policy="AdminPolicy>Delete</button>
<span class="btn btn-disabled" asp-authz-not-policy="AdminPolicy">Delete</span>

Does asp-authz-not-policy seem reasonable to implement?

dahlbyk avatar Nov 23 '22 15:11 dahlbyk

Sure, it would just be checking if the user doesn't pass a given authz policy.

DamianEdwards avatar Nov 28 '22 21:11 DamianEdwards