]> source.dussan.org Git - gitea.git/commit
Fix permissions for Token DELETE endpoint to match GET and POST (#27610) (#28099)
authorGiteabot <teabot@gitea.io>
Fri, 17 Nov 2023 04:24:16 +0000 (12:24 +0800)
committerGitHub <noreply@github.com>
Fri, 17 Nov 2023 04:24:16 +0000 (12:24 +0800)
commit93ede4bc83ccb231b9ca67041318a0811d1d34dd
tree0d8e08679829c0e64be64712e70ac5a89363b0c0
parent9f63d27ec4041897bb393a5f132af609a4988bf2
Fix permissions for Token DELETE endpoint to match GET and POST (#27610) (#28099)

Backport #27610 by @evantobin

Fixes #27598

In #27080, the logic for the tokens endpoints were updated to allow
admins to create and view tokens in other accounts. However, the same
functionality was not added to the DELETE endpoint. This PR makes the
DELETE endpoint function the same as the other token endpoints and adds
unit tests

Co-authored-by: Evan Tobin <me@evantob.in>
routers/api/v1/user/app.go
tests/integration/api_token_test.go