Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthZ: Not Authorized By Policy #54

Open
dahlbyk opened this issue Nov 23, 2022 · 1 comment
Open

AuthZ: Not Authorized By Policy #54

dahlbyk opened this issue Nov 23, 2022 · 1 comment

Comments

@dahlbyk
Copy link
Contributor

dahlbyk commented Nov 23, 2022

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?

@DamianEdwards
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants