Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Permissions for which users/group have read access to a particular branch???

SteveKranz1958
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 12, 2022

I know that I can use the Settings > Branch permissions to control modifications to a branch (write operations), but I don't see that I can control read operations. There is a branch I want to setup that allows a subset to view, while general access to the rest of the repo is the larger audience. Is this possible?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 17, 2022

Hi @SteveKranz1958 and welcome to the community.

I'm afraid that this is not possible, it is not supported natively by Git and we also don't have a feature to do so.

When a user is granted at least read access to a repo, they can view all branches and source code in the repo.

You can look into using submodules: instead of keeping this branch in the existing repo (let's call it repo A), create a second repo, repo B, with this branch, and make repo B a submodule of repo A. This way you can grant access to different users in repo A and in repo B.

With submodules, when you clone repo A you can also get repo B' source code if you initialize and update the submodule (someone needs to have access to repo B to do that).
Please keep in mind though that it won't be possible to merge changes from repo B's branch to a branch of repo A, since they are essentially different repos.

You can read more about submodules here:

Kind regards,
Theodora

SteveKranz1958
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 17, 2022

Thank you Theodora. I appreciate your response.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2022

You are welcome Steve, please feel free to reach out if you ever need anything else.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events