Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-20121

Cannot create protected branches using the OAuth consumer belonging to the team account/workspace.

      Currently, it is not possible to create a protected branch(branch permission set up to restrict access to certain users only) using the API using the Team account/workspace OAuth credentials. We get BRANCH_PERMISSION_VIOLATED error.

      Steps to reproduce the error:

      • Create oAuth for the TEAM workspace atlas_team123
      • Create Access token using oAuth key and secret of atlas_team123 TEAM workspace
        curl -X POST -u key:secret https://bitbucket.org/site/oauth2/access_token -d grant_type=client_credentials
        
      • Create repo_bbs repository in atlas_team123 TEAM account
      • Setup branch permission for release/* branch and give Administrators group only write access in atlas_team123/repo_bbs
      • Administrators group has only one individual account and not TEAM workspace atlas_team123
      • Make an API call to create a branch using the access token for atlas_team123 TEAM account 
        curl 'https://api.bitbucket.org/2.0/repositories/atlas_team123/repo_bbs/refs/branches' -A 'bitbucket-api-client/1.1' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Bearer xxxx' -X POST -d '{"name":"release\/20.20.20","target":{"hash":"master"}}'
        

        You will receive the below error

        {"data": {"key": "BRANCH_PERMISSION_VIOLATED"}, "type": "error", "error": {"message": "You are not allowed to create a branch that matches the pattern \"release/*\".", "data": {"key": "BRANCH_PERMISSION_VIOLATED"}}}$ 

      This is because we have a branch permission to restrict access to certain users only and team accounts/workspace cannot be added as users in the branch permission.

      Hence even though the team account/workspace is the owner of the repository the team account's OAuth cannot be used to create the restricted branch.

      This affects the customers as they need to add a service account to the group that has branch permission and use the service account's OAuth credentials to create the branch.

      It would be good to have the ability to use the team account/workspace OAuth instead.

       

            [BCLOUD-20121] Cannot create protected branches using the OAuth consumer belonging to the team account/workspace.

            From the moment I started engaging with this online casino community, I felt a strong sense of excitement and involvement. https://aviatorgame.in/game-review/ The interactive graphics and smooth gameplay have captivated me. I found that the balance between chance and strategy makes every moment unpredictable and fun. The guides and community advice available truly enhance my decision-making skills. This deep dive into the world of online casino games has been both challenging and rewarding, growing my interest and knowledge over time.

            Carlos Gucci added a comment - From the moment I started engaging with this online casino community, I felt a strong sense of excitement and involvement. https://aviatorgame.in/game-review/ The interactive graphics and smooth gameplay have captivated me. I found that the balance between chance and strategy makes every moment unpredictable and fun. The guides and community advice available truly enhance my decision-making skills. This deep dive into the world of online casino games has been both challenging and rewarding, growing my interest and knowledge over time.

            You should check out https://aviatorgame.com.pk/apps/4rabet/. They have apps with great bonuses for first-time users. I signed up recently and got a fantastic welcome bonus. The app has a sleek design, and the games are super fun. I especially love their slots and live sports options. It’s definitely worth exploring if you’re into online betting.

            Maxwell Anderson added a comment - You should check out https://aviatorgame.com.pk/apps/4rabet/ . They have apps with great bonuses for first-time users. I signed up recently and got a fantastic welcome bonus. The app has a sleek design, and the games are super fun. I especially love their slots and live sports options. It’s definitely worth exploring if you’re into online betting.

            Hey guys, for a boho, earthy vibe, I recommend https://aktis.design/en/4-outdoor-furniture . Her designs are full of vibrant colors, lush greenery, and global-inspired decor. I purchased some of her wallpapers and throw pillows for my bedroom, and it instantly added personality to the space. Her blog and books are also packed with tips for creating cozy, layered interiors that feel personal and inviting.

            Bogdan Kvintov added a comment - Hey guys, for a boho, earthy vibe, I recommend https://aktis.design/en/4-outdoor-furniture . Her designs are full of vibrant colors, lush greenery, and global-inspired decor. I purchased some of her wallpapers and throw pillows for my bedroom, and it instantly added personality to the space. Her blog and books are also packed with tips for creating cozy, layered interiors that feel personal and inviting.

            I wanted to find a website where I could get reliable updates on games and other related resources. That’s how I came across https://plinkopakistan.games/ . The site is easy to navigate and provides updates on topics that are actually helpful. I also liked that they mention bonuses and other offers, which made the site even more interesting.

            Jamiel Vanser added a comment - I wanted to find a website where I could get reliable updates on games and other related resources. That’s how I came across https://plinkopakistan.games/ . The site is easy to navigate and provides updates on topics that are actually helpful. I also liked that they mention bonuses and other offers, which made the site even more interesting.

            My family was in need of a break from the city, so I decided to search for a quiet place where we could relax. I came across https://alessandra.aktis.villas while browsing, and it looked just right. The site had a lot of detailed info on the villas, including the different family-friendly amenities, like a private pool and large garden spaces. There were also some interesting discounts for longer stays and family packages that made it affordable. With all the clear descriptions and great offers, it was an easy decision to book.

            Jamiel Vanser added a comment - My family was in need of a break from the city, so I decided to search for a quiet place where we could relax. I came across https://alessandra.aktis.villas while browsing, and it looked just right. The site had a lot of detailed info on the villas, including the different family-friendly amenities, like a private pool and large garden spaces. There were also some interesting discounts for longer stays and family packages that made it affordable. With all the clear descriptions and great offers, it was an easy decision to book.

              Unassigned Unassigned
              dbhat@atlassian.com Dheeraj (Inactive)
              Affected customers:
              13 This affects my team
              Watchers:
              24 Start watching this issue

                Created:
                Updated: