-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix token endpoints ignore specified account #27080
Fix token endpoints ignore specified account #27080
Conversation
#27040 is also related I'm not in favour of doing it this way. All other |
If a endpoint is mean to uses by admins, it should be in the |
Yes, that's how I implemented it in #26323 as well. but
|
I don't get that argument. It's nice that you know that, but that doesn't matter. here. A API should try to keep a consistent design to not confuse users. And the current design is, that all endpoints under I think the best way to solve this is to simply move the endpoint to |
My point of view is the same as yours, but no one reviewed #26323 for a long time. |
I we introduce a new role For me the |
I'm not saying the current system is perfect, but at least we have a system. And in the current system we use the |
This is the first and only endpoint, so there is no difference to other endpoints.
|
As I said, there are other endpoints to edit the settings of a User
This is Gitea, not GitLab |
I'm a strong proponent of always using plural on REST API URLs. It's the only sane design. It allows construction of URLs, eases URL-based permission scheme, allows grouping by endpoint in swagger, etc. There are numerous benefits of avoiding these singulars. https://stackoverflow.com/a/21809963/808699 The only valid case for singular is if the resource is a singleton, e.g. |
Yep, in the admin area where they should not be.
They did not make the mistake. |
We do that, just not for the |
Please run the |
No new changes were made to Swagger, and the re-execution has nothing to commit. |
Do we need to backport to 1.20? @lunny |
No I guess |
* origin/main: Fix the incorrect route path in the user edit page. (go-gitea#27007) Refactor lfs requests (go-gitea#26783) Display archived labels specially when listing labels (go-gitea#26820) Remove a `gt-float-right` and some unnecessary helpers (go-gitea#27110) [skip ci] Updated licenses and gitignores Fix token endpoints ignore specified account (go-gitea#27080) Make SSPI auth mockable (go-gitea#27036)
* giteaofficial/main: Improve actions docs related to `pull_request` event (go-gitea#27126) Remove outdated paragraphs when comparing Gitea Actions to GitHub Actions (go-gitea#27119) Fix: treat tab "overview" as "repositories" in user profiles without readme (go-gitea#27124) Fix incorrect test code for error handling (go-gitea#27139) Increase auth provider icon size on login page (go-gitea#27122) fix pagination for followers and following (go-gitea#27127) services/wiki: Close() after error handling (go-gitea#27129) Use fetch helpers instead of fetch (go-gitea#27026) Change green buttons to primary color (go-gitea#27099) Fix wrong xorm get usage on migration (go-gitea#27111) Fix the incorrect route path in the user edit page. (go-gitea#27007) Refactor lfs requests (go-gitea#26783) Display archived labels specially when listing labels (go-gitea#26820) Remove a `gt-float-right` and some unnecessary helpers (go-gitea#27110) [skip ci] Updated licenses and gitignores Fix token endpoints ignore specified account (go-gitea#27080) Make SSPI auth mockable (go-gitea#27036)
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
…itea#27610) Fixes go-gitea#27598 In go-gitea#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
…) (#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 <[email protected]>
Fix #26234
close #26323
close #27040