0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-07 03:23:32 +01:00
gitea/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
blame.go
branch.go
cherry_pick.go
commit.go
compare.go
download.go
editor_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
editor.go Fix blank dir message when uploading files from web editor (#25391) 2023-06-20 19:58:03 +00:00
find.go
helper_test.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
helper.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
http_test.go
http.go
issue_content_history.go
issue_dependency.go
issue_label_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
issue_label.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
issue.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +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_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
projects.go
pull_review.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
pull.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
release_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
release.go Add actor and status dropdowns to run list (#25118) 2023-06-21 04:25:14 +00:00
render.go
repo.go
search.go
setting_protected_branch.go
setting.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_test.go
view.go
webhook.go Fix Permission in API returned repository struct (#25388) 2023-06-22 13:08:08 +00:00
wiki_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
wiki.go