---
title: "Branch Permissions Are Now Branch Restrictions"
canonical: "https://support.appfire.com/space/SCLI/73372286/Branch%20Permissions%20Are%20Now%20Branch%20Restrictions"
format: markdown
---
> Macro (div)
> 
> ### On this page

# Description

Bitbucket 4.x completely changed the branch permission model that previously existed with Stash. While Bitbucket still refers to the concept as **Branch Permissions**, the [documentation](https://confluence.atlassian.com/bitbucketserver/using-branch-permissions-776639807.html) actually indicates that the new model is really a branch restriction model - **"... are actually restrictions, which are checked after project and repository level permissions"**. And, in fact, the model is **restrictions with exceptions** by groups or users. Keyed by restriction and matching type, different restrictions can be added.

We have decided that the CLI needs to reflect the terminology of the new model and discard the older terminology in order to avoid confusion in the future. While it is understandable that Atlassian has chosen to keep the older terminology at least for now to reduce the impact of the change on documentation and because the UI can mask the confusing points, we feel the same is not true for CLI action names and terminology. 

The result is we have made some significant incompatible changes related to **Branch Permission** related actions. As a policy, we rarely make incompatible changes like this, but, in this case we feel it was warranted.

> ✅ Affective with [CLI 5.6](https://appfire.atlassian.net/wiki/spaces/ACLI/pages/60565856) and above.

# Removed Actions

- **grantBranchPermissions**
- **updateBranchPermissions**
- **revokeBranchPermissions**
- **getBranchPermissionList**

# New Actions

- **addBranchRestriction**
- **removeBranchRestriction**
- **getBranchRestrictionList**

# Related Parameters

> Macro (table-plus)
> 
> | **Parameter** | **Default** | **Description** |
> | --- | --- | --- |
> | restriction | read-only | Branch restriction. Defaults to read-only. Restrictions are:<br>> Macro (legacy-content) |
> | matchingType | BRANCH | Branch matching type. Defaults to BRANCH. Determines usage of **branch** parameter value. Types are:<br>- BRANCH - a specific branch name, branch must exist unless **continue** parameter is specified
> - PATTERN - [Branch permission patterns](https://confluence.atlassian.com/bitbucketserver/branch-permission-patterns-776639814.html)
> - MODEL - [Branch models](https://confluence.atlassian.com/bitbucketserver/using-branches-in-bitbucket-server-776639968.html#UsingbranchesinBitbucketServer-model) |
> | branch |  | For branch permissions, it can represent a branch, branch pattern, or branching model. Examples:<br>- master (BRANCH)
> - xyz* (PATTERN)
> - feature/ (MODEL) |
> | group |  | A comma separated list of group names. Groups are **exceptions** to the restriction. |
> | userId |  | A comma separated list of user ids. Users are **exceptions** to the restriction. |

# Discontinued Stash Support

With [CLI 5.6](https://appfire.atlassian.net/wiki/spaces/ACLI/pages/60565856), we are no longer supporting Stash 3.x. We didn't want to confuse the branch permission issue further by trying to support both models at the same time.  


> Macro (__confluenceADFMigrationUnsupportedContentInternalExtension__)