Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-30 05:46:09 +01:00
forgejo/routers/api/v1
Giteabot 2ab54a9c06
Fix issue dependencies (#27736) (#28776)
Backport #27736 by @lng2020

Fix #27722
Fix #27357
Fix #25837
Fix #28732
1. Fix the typo `BlockingByDependenciesNotPermitted`, which causes the
`not permitted message` not to show. The correct one is `Blocking` or
`BlockedBy`
2. Rewrite the perm check. The perm check uses a very tricky way to
avoid duplicate checks for a slice of issues, which is confusing. In
fact, it's also the reason causing the bug. It uses `lastRepoID` and
`lastPerm` to avoid duplicate checks, but forgets to assign the
`lastPerm` at the end of the code block. So I rewrote this to avoid this
trick.
![I U1AT{GNFY3
1HZ`6L{(2L](https://github.com/go-gitea/gitea/assets/70063547/79acd02a-a567-4316-ae0d-11c6461becf1)
3. It also reuses the `blocks` slice, which is even more confusing. So I
rewrote this too.

![UARFPXRGGZQFB7J$2`R}5_R](https://github.com/go-gitea/gitea/assets/70063547/f21cff0f-d9ac-4ce4-ae4d-adffc98ecd99)

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
(cherry picked from commit 571822b6ec)
2024-01-16 14:39:23 +00:00
..
activitypub More refactoring of db.DefaultContext (#27083) 2023-09-15 06:13:19 +00:00
admin chore(api): support ignore password if login source type is LDAP for creating user API (#28491) (#28525) 2023-12-22 12:10:03 +01:00
misc [BRANDING] Update nodeinfo branding 2023-11-13 13:58:18 +01:00
notify More db.DefaultContext refactor (#27265) (#27347) 2023-09-29 13:35:01 +00:00
org [MODERATION] User blocking 2023-11-13 13:58:02 +01:00
packages Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
repo Fix issue dependencies (#27736) (#28776) 2024-01-16 14:39:23 +00:00
settings Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
swagger [MODERATION] User blocking 2023-11-13 13:58:02 +01:00
user Fix comment permissions (#28213) (#28216) 2023-11-26 13:56:50 +01:00
utils Fix: system webhooks API bug (#28531) (#28666) 2024-01-16 14:16:55 +00:00
api.go Require token for GET subscription endpoint (#28765) (#28768) 2024-01-16 14:39:23 +00:00