Grant permissions on the specific folder in repository

Hi Everyone,

I want to implement a following use case:

  1. We have a repository ‘R’ containing the folders and some files (Folder-1,Folder-2,Folder-3, File-1, File-2)
  2. User creates his feature branch (A) from dev branch.
  3. When user will create the merge request for Dev branch, only the changes done in Folder-1 and File-1 can only be the part of this merge request. Because User don’t have permission to include changes in Folder-2, Folder-3 and File-2 in merge request to Dev. But user can commit everything in his feature branch.

How can I make this happen? How I can implement this use case in gitlab?

Thanks in advance.

I would love to know if this is possible as well. I got a specific folder I only want to allow Maintainers and Owners to push to.

Maybe this: Permissions | GitLab

however, it’s only available in premium. And it can only be unlocked by the person who locked it. Although this does seem to show exclusive locks as being available on all tiers including free: File Locking | GitLab and this one definitely needs premium and seems to match what you want to do: File Locking | GitLab