mirror of
1
Fork 0
forgejo/routers/api/v1/user
Giteabot 702ef8d12f
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>
(cherry picked from commit 93ede4bc83)
2023-11-22 17:12:11 +01:00
..
action.go Refactor secrets modification logic (#26873) 2023-09-05 15:21:02 +00:00
app.go Fix permissions for Token DELETE endpoint to match GET and POST (#27610) (#28099) 2023-11-22 17:12:11 +01:00
avatar.go Add API for changing Avatars (#25369) 2023-06-29 23:22:55 +00:00
email.go Reduce usage of `db.DefaultContext` (#27073) 2023-09-14 17:09:32 +00:00
follower.go [MODERATION] User blocking 2023-11-13 13:58:02 +01:00
gpg_key.go Another round of `db.DefaultContext` refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
helper.go Another round of `db.DefaultContext` refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
hook.go Add user webhooks (#21563) 2023-03-10 08:28:32 -06:00
key.go Another round of `db.DefaultContext` refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
repo.go Delete repos of org when purge delete user (#27273) (#27728) 2023-11-01 10:03:12 +08:00
settings.go Move `convert` package to services (#22264) 2022-12-29 10:57:15 +08:00
star.go More refactoring of `db.DefaultContext` (#27083) 2023-09-15 06:13:19 +00:00
user.go Merge branch 'rebase-v1.21/forgejo-dependency' into wip-v1.21-forgejo 2023-11-13 16:47:12 +01:00
watch.go More refactoring of `db.DefaultContext` (#27083) 2023-09-15 06:13:19 +00:00