Add member with limited access permissions
Asked by Vasco Martins:

Hi to all,  
Is it possible to add a member to a project but with limited view over the entire project?

The user could only have access and work in particular parts of the project without the possibility to download the entire code of the full project.

<br />

I can't find any articles on the subject.  
Thank you in advance.


Answers:
author: Norbert C
body: Hi Vasco,

Thanks for reaching out to Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

Unfortunately what you would like to achieve is not possible with project permissions. What I would like to suggest you is to provide users access on a repository level.

For example, user A has access to repo a,b,c,d  
user B has access to repo a,b,c  
etc.

Please let me know if this helps.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: Vasco Martins
body: Thank you for the help,  
Meaning the repo a,b,c,d would be parallel brunches with only parts of the project?  
And then I could copy over manually the code that is important and merge it with the main.  

If this is the case, is not the most elegant solution but it might work.  

best regards  
Vasco


author: Norbert C
body: Hi [@Vasco Martins](/t5/user/viewprofilepage/user-id/4923136)

Thank you for your reply. I believe I might have misunderstood you.

I would like to verify whether by project do you mean a repository where you upload the code or do you mean a [Bitbucket Cloud Project](https://support.atlassian.com/bitbucket-cloud/docs/create-and-manage-projects-in-bitbucket-cloud/)?

Please let me know.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


author: Vasco Martins
body: Hi Norbert,  

I mean a project ongoing in Bitbucket repository.  
Based on [Configure a project's branching model](https://support.atlassian.com/bitbucket-cloud/docs/configure-a-projects-branching-model/) I can give access to "feature" branch but the programer working on that branch has access and can download the entire code of the project right?  
This is for me a security issue since I need a developer to work only in some features.


author: Theodora Boudale
body: Hi [@Vasco Martins](/t5/user/viewprofilepage/user-id/4923136),

Please allow me to step in as Norbert is out of office.

If a user has been granted access to a repository, they can clone/download the whole repository, there is no way to restrict that.

Branch permissions can prevent users from pushing to certain branches, however, they will still be able to clone the whole repository.

You can look into using Git Submodules:

* <https://git-scm.com/book/en/v2/Git-Tools-Submodules>

Let's say you have repo A, with the code that only you can access.  
You can create repo B, and make it a submodule of repo A. Repo B will also have only part of your code, and you can grant access to a developer only to repo B.

Kind regards,  
Theodora


author: Vasco Martins
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)   

Thank you for the information, I was imagining that would be the solution.  

Now the issue is selecting the right information to share and how to import it back to the main full development branch.  

Best regards

Vasco


Tags: bitbucket-cloud

cloud