0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-28 16:56:26 -05:00
forgejo/routers/web
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
..
admin Use a separate admin page to show global stats, remove actions stat (#25062) 2023-06-03 22:03:41 +08:00
auth Show OAuth2 errors to end users (#25261) (#25271) 2023-06-15 02:48:36 +00:00
devtest
events
explore
feed
healthcheck
misc Decouple the different contexts from each other (#24786) 2023-05-21 09:50:53 +08:00
org Merge new project templates into one (#24985) 2023-05-31 08:50:18 +02:00
repo Fix Permission in API returned repository struct (#25388) (#25441) 2023-06-22 17:01:42 +02:00
shared Respect original content when creating secrets (#24745) 2023-05-16 14:49:40 +08:00
user Fix profile render when the README.md size is larger than 1024 bytes (#25270) 2023-06-15 01:39:34 +00:00
auth.go
auth_windows.go
base.go Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
goget.go
home.go
metrics.go
nodeinfo.go
swagger_json.go
web.go Show outdated comments in files changed tab (#24936) (#25428) 2023-06-22 08:34:42 +00:00
webfinger.go