• Patrick Bajao's avatar
    Prevent infinite loop when checking if collaboration is allowed · ef4a03f8
    Patrick Bajao authored
    When there are merge requests in the same project that have their
    source/target branches to each other and collaboration is allowed,
    it can result to an infinite loop when a Reporter/Guest views a
    project.
    
    This fix adds a `skip_collaboration_check` to `Gitlab::UserAccess`
    so when `Project#fetch_branch_allows_collaboration` calls
    `MergeRequest#can_be_merged_by?` (which calls `Gitlab::UserAccess`
    again), it will not check if collaboration is allowed.
    ef4a03f8
project_spec.rb 210 KB