Prevent infinite loop when checking if collaboration is allowed
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.
Showing
Please register or sign in to comment