forgejo/modules
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 Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 2023-05-26 01:04:48 +00:00
activitypub
analyze
assetfs
auth
avatar
base
cache
charset
container
context Fix open redirect check for more cases (#25143) (#25154) 2023-06-08 18:03:42 +02:00
csv
doctor
emoji
eventsource
generate
git Fix index generation parallelly failure (#25235) (#25269) 2023-06-15 02:14:00 +00:00
gitgraph
graceful Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
hcaptcha
highlight
hostmatcher
html
httpcache
httplib
indexer Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
issue/template
json
label
lfs
log Improve logger Pause handling (#24946) 2023-05-27 22:35:44 +02:00
markup Fix task list checkbox toggle to work with YAML front matter (#25184) (#25227) 2023-06-13 08:23:21 +00:00
mcaptcha
metrics Use a separate admin page to show global stats, remove actions stat (#25062) 2023-06-03 22:03:41 +08:00
migration
mirror Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
nosql
notification Rename NotifyPullReviewRequest to NotifyPullRequestReviewRequest (#24988) 2023-05-31 15:54:46 +08:00
options
packages
paginator
pprof
private Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 2023-05-26 01:04:48 +00:00
process Do not output "Trace" level logs from process manager by default (#24952) 2023-05-27 10:55:24 +00:00
proxy
proxyprotocol
public
queue Help to recover from corrupted levelqueue (#24912) 2023-05-29 10:52:32 +08:00
recaptcha
references
regexplru
repository Remove stars when repo goes private (#19904) 2023-06-05 13:25:43 +00:00
secret
session
setting Use "utf8mb4" for MySQL by default (#25432) 2023-06-22 07:38:23 +02:00
sitemap
ssh Fix incorrect config argument position for builtin SSH server (#25341) 2023-06-18 16:56:21 +00:00
storage Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
structs Fix Permission in API returned repository struct (#25388) (#25441) 2023-06-22 17:01:42 +02:00
svg Use inline SVG for built-in OAuth providers (#25171) (#25234) 2023-06-13 12:04:40 +00:00
sync
system
templates Fix missing commit message body when the message has leading newlines (#25418) (#25422) 2023-06-21 13:55:08 +02:00
test Fix admin config page error, use tests to cover the admin config and 500 error page (#24965) 2023-05-29 15:00:21 +00:00
testlogger
timeutil
translation Refactor INI package (first step) (#25024) 2023-06-02 17:27:30 +08:00
turnstile
typesniffer
updatechecker
upload
uri
user
util Fix profile render when the README.md size is larger than 1024 bytes (#25270) 2023-06-15 01:39:34 +00:00
validation
web
webhook