Submodules - access and permissions

Hi All,

I am new to submodules and got following queries and appreciate response/clarification for the same,

I got a project repository Project-A and submodules SM1 each registered in gitlab under different groups say e.g group A and group B, which has different set of developers/maintainers etc for each.
1. Are users part of Group A will be able to reference SM1
2. Are the users who are part of Group A needs to be added to group B so that they can access SM1? if so what roles with? so that after the SM1 is referenced user should be able to perform git operations when committing the project on his local machine
3 . is the code on SM1 gets cloned into Project-A
4. While Project A is cloned and worked by multiple developers does the SM1 code also get cloned along with the same structure. Can developers for Project A be able to modify contents inside SM1 and perform commits?
5. Does pull operation brings the new changes at SM1 while pulling code from Project-A?
6. Can a project be included multiple times (under different folders) for the same project?

Thanks.

Hi @renga-204

  1. only if they have permissions to “pull project code”
  2. yes, you need to add them to group B or the project SM1 as members. The role depends on what they need to do, you can see role definitions in Permissions and roles | GitLab
  3. plain git pull won’t clone/init/update submodules. There is another command git submodule more info available in official docs Git - git-submodule Documentation
  4. They can perform changes and commits on their local cloned copy. If they are able to push the commits to remote depends on the role you give them in GitLab
  5. no, see 3.
  6. yes

Thanks @balonik , will go through the documentation and other links that you have shared.