XP-Dev.com Documentation

Branch Based Permissions for Repositories

This user guide only applies if your account and project is on our new platform, i.e. if your project's URL begins with https://<your-account>.xp-dev.com rather than https://xp-dev.com.

Pushing to Git and Mercurial repositories can be restricted on a per-branch basis. It is also possible to restrict who can create/delete branches and tags.

Creating new branch permissions

  • Head over to your XP-Dev.com project's Repository tab
  • Click on the repository that you'd like to define branch based permissions for
  • Head to the Branch Permissions sub-tab of your repository

Edit Repository

Branch permission types

There are five types of permsission types:

  • Write: Used to allow/deny a specific user (or all users) to push to a specific branch or all branches
  • Create branch: Used to allow/deny a specific user (or all users) to create a new branch
  • Delete branch: Used to allow/deny a specific user (or all users) to delete an existing branch
  • Create tag: Used to allow/deny a specific user (or all users) to create a new tag
  • Delete tag: Used to allow/deny a specific user (or all users) to delete an existing tag

Permission precedence

You can define more general permissions along with more specific ones. The more specific ones take precedence over the general ones. For example, if you have the following rules, only the user admin-user will be allowed to push to the master branch:

Branch permissions example

Feel free to contact us if you need any assistance.