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

Greenfield: Admins can create/delete API keys of any user #4680

Merged
merged 5 commits into from
Feb 24, 2023

Conversation

NicolasDorier
Copy link
Member

@NicolasDorier NicolasDorier commented Feb 22, 2023

Close #4675

Improved doc to close
Close #4673

@@ -27,7 +27,47 @@
},
"security": [
{
"API_Key": ["unrestricted"],
"API_Key": [ "unrestricted" ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you introduced the canmanageuser permission. I wonder if it still needs to say unrestricted here or canmanageuser is enough now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is different. This route is for the current user, so it has different permission.

The CanManageUser is a server policy, only available to admins.
You need unrestricted if you want to remove keys from the current user.

Note that unrestricted doesn't mean "admin". It means that the user need to have access to all permissions via unrestricted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks for the explanation.

BTCPayServer.Client/Permissions.cs Outdated Show resolved Hide resolved
BTCPayServer.Client/Permissions.cs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants