1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-07-01 02:05:30 +00:00
gitea/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.
2023-06-22 13:08:08 +00:00
..
activity.go Add activity feeds API (#23494) 2023-04-04 21:35:31 +08:00
activitypub.go
admin_user.go Allow custom "created" timestamps in user creation API (#22549) 2023-02-16 10:32:01 -06:00
attachment.go
commit_status.go Implement actions (#21937) 2023-01-31 09:45:19 +08:00
cron.go
doc.go
fork.go
git_blob.go
git_hook.go
hook.go New webhook trigger for receiving Pull Request review requests (#24481) 2023-05-24 22:06:27 -04:00
issue_comment.go
issue_label.go Add API for Label templates (#24602) 2023-05-23 18:10:23 +08:00
issue_milestone.go
issue_reaction.go
issue_stopwatch.go
issue_test.go
issue_tracked_time.go
issue.go Add the ability to pin Issues (#24406) 2023-05-25 15:17:19 +02:00
lfs_lock.go
mirror.go
miscellaneous.go Add API for gitignore templates (#22783) 2023-04-27 11:51:20 +08:00
nodeinfo.go
notifications.go
org_member.go
org_team.go
org.go Fix Org edit page bugs: renaming detection, maxlength (#24161) 2023-04-17 11:35:57 -04:00
package.go
pull_review.go
pull.go Add the ability to pin Issues (#24406) 2023-05-25 15:17:19 +02:00
release.go
repo_branch.go Supports wildcard protected branch (#20825) 2023-01-16 16:00:22 +08:00
repo_collaborator.go
repo_commit.go
repo_file.go fix swagger documentation for multiple files API endpoint (#25110) 2023-06-07 23:49:58 +08:00
repo_key.go
repo_note.go
repo_refs.go
repo_tag.go
repo_topic.go
repo_tree.go
repo_watch.go
repo_wiki.go
repo.go Fix Permission in API returned repository struct (#25388) 2023-06-22 13:08:08 +00:00
settings.go
status.go
task.go Make repo migration cancelable and fix various bugs (#24605) 2023-05-11 08:25:46 +00:00
user_app.go Add scopes to API to create token and display them (#22989) 2023-02-20 15:28:44 -06:00
user_email.go add admin API email endpoints (#22792) 2023-03-14 03:54:40 -04:00
user_gpgkey.go
user_key.go
user.go add user rename endpoint to admin api (#22789) 2023-03-14 03:45:21 -04:00
visible_type.go change org_type.go to visible_type.go and fix the notes (#22752) 2023-02-09 06:40:34 +00:00