This message was deleted.
# gitops
s
This message was deleted.
d
Hi Simon! I'm new here but a long time Gitlab user. The free version of gitlab offers little in terms of permissions division within the same branch of the same repository. You can lock particular files with an exclusive lock. You could experiment with locking files in your prod folder. https://docs.gitlab.com/ee/user/project/file_lock.html for more information. What you may want to try is a
CODEOWNERS
file - i have limited experience with creating them it but it does seem to do what you ask. try something along the lines of:
Copy code
[Prod approvals] @admin
/prod/
more here: https://docs.gitlab.com/ee/user/project/codeowners/
s
Hi @Danny Huston, thanks for your reply. I'm using GitLab Premium, so I can use the paid features. I already checked both options and both are unfortunately not feasible. If I understand it correctly, only the user who locked the files can unlock it. I'm working in a team and we don't want to depend on one user. To use code owners, you need to protect your branch. We are only working with one main branch and I think you cannot unprotect on folder. Please correct me, if I understood something wrong.
d
@Simon you are correct. You could potentially protect the branch but relax the rules to allow push by a certain group or role, and then use codeowners and specify a different group to protect /prod/ ? I'll ask some colleagues if they have done something like this before for monorepo
s
That would be great. Thank's again, @Danny Huston.
j
its been a while since I was on this slack, but spotted this convo: check out: https://about.gitlab.com/blog/2022/07/12/tips-for-managing-monorepos-in-gitlab/ HTH