• Luke Duncalfe's avatar
    Use owner for git actions during designs copy · fc3ebbc0
    Luke Duncalfe authored
    When moving an issue we copy the design collection. Copying the design
    collection involves adding commits to the design repository. Some users
    have permission to move the issue (`:admin_issue` on the target
    project), but not permission to push to the design repository of that
    project and are being denied by
    `GitAccessDesign#check_can_create_design!`.
    
    Instead we now use the `Project#default_owner` to perform all of the git
    actions instead of the `current_user`.
    
    We still record the correct `Version#author` of the design in PostgreSQL
    and still check the user can `:admin_issue` the target issue before
    performing the copy.
    
    https://gitlab.com/gitlab-org/gitlab/-/issues/263102
    fc3ebbc0
263102-bugfix-use-project-owner-to-perform-git-actions-during-design-copy.yml 137 Bytes