You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules/structs
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.
1 year ago
..
activity.go Add activity feeds API (#23494) 1 year ago
activitypub.go Implement FSFE REUSE for golang files (#21840) 2 years ago
admin_user.go Allow custom "created" timestamps in user creation API (#22549) 1 year ago
attachment.go Implement FSFE REUSE for golang files (#21840) 2 years ago
commit_status.go Implement actions (#21937) 1 year ago
cron.go Implement FSFE REUSE for golang files (#21840) 2 years ago
doc.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fork.go Implement FSFE REUSE for golang files (#21840) 2 years ago
git_blob.go Implement FSFE REUSE for golang files (#21840) 2 years ago
git_hook.go Implement FSFE REUSE for golang files (#21840) 2 years ago
hook.go New webhook trigger for receiving Pull Request review requests (#24481) 1 year ago
issue.go Add the ability to pin Issues (#24406) 1 year ago
issue_comment.go Add API management for issue/pull and comment attachments (#21783) 2 years ago
issue_label.go Add API for Label templates (#24602) 1 year ago
issue_milestone.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_reaction.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_stopwatch.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_tracked_time.go Implement FSFE REUSE for golang files (#21840) 2 years ago
lfs_lock.go Implement FSFE REUSE for golang files (#21840) 2 years ago
mirror.go Add `sync_on_commit` option for push mirrors api (#22271) 2 years ago
miscellaneous.go Add API for gitignore templates (#22783) 1 year ago
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
notifications.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org.go Fix Org edit page bugs: renaming detection, maxlength (#24161) 1 year ago
org_member.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_team.go Implement FSFE REUSE for golang files (#21840) 2 years ago
package.go Implement FSFE REUSE for golang files (#21840) 2 years ago
pull.go Add the ability to pin Issues (#24406) 1 year ago
pull_review.go Implement FSFE REUSE for golang files (#21840) 2 years ago
release.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Fix `Permission` in API returned repository struct (#25388) 1 year ago
repo_branch.go Supports wildcard protected branch (#20825) 1 year ago
repo_collaborator.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_commit.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_file.go fix swagger documentation for multiple files API endpoint (#25110) 1 year ago
repo_key.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_note.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_refs.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_tag.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_topic.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_tree.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_watch.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_wiki.go Implement FSFE REUSE for golang files (#21840) 2 years ago
settings.go Implement FSFE REUSE for golang files (#21840) 2 years ago
status.go Implement FSFE REUSE for golang files (#21840) 2 years ago
task.go Make repo migration cancelable and fix various bugs (#24605) 1 year ago
user.go add user rename endpoint to admin api (#22789) 1 year ago
user_app.go Add scopes to API to create token and display them (#22989) 1 year ago
user_email.go add admin API email endpoints (#22792) 1 year ago
user_gpgkey.go Implement FSFE REUSE for golang files (#21840) 2 years ago
user_key.go Implement FSFE REUSE for golang files (#21840) 2 years ago
visible_type.go change org_type.go to visible_type.go and fix the notes (#22752) 1 year ago