Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Permission in API returned repository struct (#25388) #25441

Merged
merged 1 commit into from
Jun 22, 2023

Commits on Jun 22, 2023

  1. Fix Permission in API returned repository struct (go-gitea#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
    renovatebot/renovate#14059 (comment)
    (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.
    wolfogre authored and GiteaBot committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    027d36b View commit details
    Browse the repository at this point in the history