Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to give read-only access to a group for the entire workspace?

Yariel Quintana
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!
November 24, 2023

Is there a way to provide read-only access across the entire workspace without having to do it project by project?. 

1 answer

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2023

Hello @Yariel Quintana and thank you for reaching out to Community!

Since the release of project permission, the simplest way of adding read access across all the workspace would be to create a user group, and assign this user group read permissions to each of the project workspace.

To add the user group to a project you can follow the below steps : 

  1. Select the Projects tab on the top navigation bar to display a list of projects within the current workspace. 
  2. Select the project you want to add the user/user group to
  3. Select Project settings on the left sidebar.
  4. Select Project permissions under the General heading on left sidebar.
  5. Select Add users or groups to add a user or group to the project and assign them permissions within the project. Enter the group or user by name or enter the user’s email address, if they are not already a member of the workspace.
  6. Select the permissions dropdown (it will be Read, by default) and select the permission you want to set for this group or user.
  7. Select Confirm to save your updates.

Once the read permission is given at the project level, this will be inherited by all the repos within that project. This just needs to be done once, meaning that new users added to that user group in the future will receive the read permission to all the projects (and their repos) where the group was added.

Hope that helps! Let us know in case you have any questions.

Thank you, @Yariel Quintana !
Patrik S

Yariel Quintana
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!
November 27, 2023

Thank you for your response, @Patrik S !

I understand that I can assign permissions to a user group in a specific project. However, my question is focused on the mass assignment of read-only permissions to a group across all projects in my workspace. The current configuration seems to require me to assign these permissions project by project, which is a time-consuming process. Is there any functionality or method that allows the bulk assignment of these permissions at the workspace level for all projects simultaneously?

I appreciate your further assistance and guidance on this matter.

Thank you in advance!

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2023

Hello @Yariel Quintana ,

I'm afraid there's not currently an option in the UI to bulk assign permissions to groups across all the projects in the workspace.

An alternative would be to create a script that leverages the Bitbucket API to achieve this task :

  • Use the List project in a workspace endpoint to get a list of all the projects in your workspace
  • For each of the projects, grant the read permission by calling the Update an explicit group permission for a project :

    Example request to assign read permission : 
    curl --request PUT -u USERNAME:APP_PASSWORD --url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}' --header 'Accept: application/json' --header 'Content-Type: application/json' --data '{ "permission": "read" }'

You can reference the Bitbucket Cloud API documentation for additional details on other available endpoints and authentication methods.

Thank you, @Yariel Quintana !

Patrik S

Like Sabine Mayer likes this

Suggest an answer

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

Atlassian Community Events