forgejo/routers/web/repo
Jason Song 174213530d
Fix Permission in API returned repository struct (#25388)
The old code generates `structs.Repository.Permissions` with only
`access.Permission.AccessMode`, however, it should check the units too,
or the value could be incorrect. For example,
`structs.Repository.Permissions.Push` could be false even the doer has
write access to code unit.

Should fix
https://github.com/renovatebot/renovate/issues/14059#issuecomment-1047961128
(Not reported by it, I just found it when I was looking into this bug)

---

Review tips:

The major changes are
- `modules/structs/repo.go`
https://github.com/go-gitea/gitea/pull/25388/files#diff-870406f6857117f8b03611c43fca0ab9ed6d6e76a2d0069a7c1f17e8fa9092f7
- `services/convert/repository.go`
https://github.com/go-gitea/gitea/pull/25388/files#diff-7736f6d2ae894c9edb7729a80ab89aa183b888a26a811a0c1fdebd18726a7101

And other changes are passive.
2023-06-22 13:08:08 +00:00
..
actions Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
setting Support configuration variables on Gitea Actions (#24724) 2023-06-20 22:54:15 +00:00
activity.go
attachment.go Fix all possible setting error related storages and added some tests (#23911) 2023-06-14 11:42:38 +08:00
blame.go
branch.go Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 2023-05-26 01:04:48 +00:00
cherry_pick.go
commit.go
compare.go
download.go Fix all possible setting error related storages and added some tests (#23911) 2023-06-14 11:42:38 +08:00
editor.go Fix blank dir message when uploading files from web editor (#25391) 2023-06-20 19:58:03 +00:00
editor_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
find.go
helper.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
helper_test.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
http.go Redesign Scoped Access Tokens (#24767) 2023-06-04 20:57:16 +02:00
http_test.go
issue.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
issue_content_history.go
issue_dependency.go
issue_label.go
issue_label_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
issue_lock.go
issue_pin.go Followup to pinned Issues (#24945) 2023-05-30 15:26:51 +00:00
issue_stopwatch.go
issue_test.go
issue_timetrack.go Fix improper HTMLURL usages in Go code (#22839) 2023-02-11 14:34:11 +08:00
issue_watch.go Rewrite logger system (#24726) 2023-05-21 22:35:11 +00:00
lfs.go
main_test.go
middlewares.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
migrate.go
milestone.go
packages.go
patch.go
projects.go Merge new project templates into one (#24985) 2023-05-31 08:50:18 +02:00
projects_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
pull.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
pull_review.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
release.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
release_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
render.go
repo.go Fix all possible setting error related storages and added some tests (#23911) 2023-06-14 11:42:38 +08:00
search.go
setting.go Hide 'Mirror Settings' when unneeded, improve hints (#24433) 2023-05-29 11:32:52 +00:00
setting_protected_branch.go
settings_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
tag.go
topic.go
treelist.go
view.go Show if File is Executable (#25287) 2023-06-16 07:46:12 +02:00
view_test.go
webhook.go Fix Permission in API returned repository struct (#25388) 2023-06-22 13:08:08 +00:00
wiki.go
wiki_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00