Skip protected branches permission check for fork sync actions
Part of epic https://gitlab.com/groups/gitlab-org/-/epics/16678 ### Problem https://gitlab.com/gitlab-org/gitlab/-/issues/517139+ adds a new field `allow_fork_sync` to `protected_branches` table. We want to skip the permission check when fork sync toggle is enabled for the branch. ### Proposal Use Gitaly context support introduced in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/178463. Pass `gitaly_context: { fork_sync: true }` to [`user_merge_branch`](https://gitlab.com/gitlab-org/gitlab/-/blob/1ebe9a5296c6b77f34264fb3ef1c7472487491d9/lib/gitlab/gitaly_client/operation_service.rb#L160) and [`user_ff_branch`](https://gitlab.com/gitlab-org/gitlab/-/blob/1ebe9a5296c6b77f34264fb3ef1c7472487491d9/lib/gitlab/gitaly_client/operation_service.rb#L218) when a merge action triggered by [Projects::Forks::SyncService](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/projects/forks/sync_service.rb#L76). [Skip permission check](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/176718/diffs#f194ed22997ededffea5bd70810a4b18f7c40821_113_121) when the `allow_fork_sync: true` for the branch See spike: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/176718/diffs?commit_id=f184977ca5b70a69fb3cfc982dc039f319217285
issue