0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-06 14:19:03 +01:00
gitea/routers/web
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
..
admin Refactor path & config system (#25330) 2023-06-21 13:50:26 +08:00
auth Show OAuth2 errors to end users (#25261) 2023-06-15 01:12:50 +00:00
devtest Change form actions to fetch for submit review box (#25219) 2023-06-14 16:01:37 +08:00
events
explore Sort users and orgs on explore by recency by default (#24279) 2023-05-06 22:04:55 +08:00
feed Pass 'not' to commit count (#24473) 2023-05-08 07:10:53 +00:00
healthcheck
misc Decouple the different contexts from each other (#24786) 2023-05-21 09:50:53 +08:00
org Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
repo Fix Permission in API returned repository struct (#25388) 2023-06-22 13:08:08 +00:00
shared Support configuration variables on Gitea Actions (#24724) 2023-06-20 22:54:15 +00:00
user Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
auth.go
auth_windows.go
base.go Fix all possible setting error related storages and added some tests (#23911) 2023-06-14 11:42:38 +08:00
goget.go Support SSH for go get (#24664) 2023-05-12 09:44:37 +00:00
home.go
metrics.go
nodeinfo.go
swagger_json.go
web.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
webfinger.go