forgejo/routers/web/repo
Giteabot 203fe2841d
Fix Permission in API returned repository struct (#25388) (#25441)
Backport #25388 by @wolfogre

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.

Co-authored-by: Jason Song <i@wolfogre.com>
2023-06-22 17:01:42 +02:00
..
actions
setting Add user level action runners (#24995) 2023-05-31 09:39:54 +08:00
activity.go
attachment.go Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
blame.go
branch.go
cherry_pick.go
commit.go
compare.go
download.go Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
editor.go Fix blank dir message when uploading files from web editor (#25391) (#25400) 2023-06-20 20:28:52 +00:00
editor_test.go
find.go
helper.go
helper_test.go
http.go Redesign Scoped Access Tokens (#24767) 2023-06-04 20:57:16 +02:00
http_test.go
issue.go Fix MilestoneIDs when querying issues (#25125) (#25141) 2023-06-08 11:03:53 +02:00
issue_content_history.go
issue_dependency.go
issue_label.go
issue_label_test.go
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
issue_watch.go
lfs.go
main_test.go
middlewares.go Show outdated comments in files changed tab (#24936) (#25428) 2023-06-22 08:34:42 +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
pull.go Show outdated comments in files changed tab (#24936) (#25428) 2023-06-22 08:34:42 +00:00
pull_review.go Show outdated comments in files changed tab (#24936) (#25428) 2023-06-22 08:34:42 +00:00
release.go
release_test.go
render.go
repo.go Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
search.go
setting.go
setting_protected_branch.go
settings_test.go
tag.go
topic.go
treelist.go
view.go Show if File is Executable (#25287) (#25300) 2023-06-16 09:29:26 +00:00
view_test.go
webhook.go Fix Permission in API returned repository struct (#25388) (#25441) 2023-06-22 17:01:42 +02:00
wiki.go
wiki_test.go