Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Java Specs PlanPermissions are not being set

When my Bamboo Spec creates a build plan the permissions are (what I presume to be) default instead of what I set in code.

Relevant parts of my code:

public static void main(String[] args) {
// ... snip ...

Plan plan = planSpec.createPlan();

PlanPermissions planPermission = planSpec.createPlanPermission();

Plan createPlan() {
return new Plan(project(), PLAN_NAME, PLAN_KEY)
// ... snip ...

Project project() {
return new Project()

createPlanPermission() {
Permissions permissions = new Permissions()
.groupPermissions("test-dev", PermissionType.VIEW, PermissionType.CLONE, PermissionType.BUILD, PermissionType.EDIT)
.groupPermissions("test-admin", PermissionType.VIEW, PermissionType.CLONE, PermissionType.BUILD, PermissionType.EDIT, PermissionType.ADMIN)

return new PlanPermissions(new PlanIdentifier(PROJECT_KEY, PLAN_KEY))

Result of "View plan as Java Specs":

public PlanPermissions planPermission() {
final PlanPermissions planPermission = new PlanPermissions(
new PlanIdentifier(PROJECT_KEY, PLAN_KEY))
.permissions(new Permissions()
return planPermission;

I am using Bamboo 7.0.4 connected to Bitbucket Server 6.6.1.

The very first successful scan of the linked repository worked fine. I was able to access the edit screen, view the generated Java Spec, etc.
Before pushing my next change (containing minor formatting), I deleted the build plan. After the next push, when the build plan was recreated, the permissions were missing. Even after deleting again and reverting my code, I can't get the permissions to work.

I had to set Project-level plan permissions before I could access the edit screen to get the above code snippet.

1 answer

1 accepted

0 votes
Answer accepted

It appears that setting Access all projects on the linked repository fixed this. 

Linked Repository -> Bamboo Specs -> Access -> Access all projects

I ticked this to resolve a different issue (plan didn't have access to create a Deployment Project), and my access levels started applying.

Unfortunately this setting appears to require Global Admin, so I'm not sure if it's appropriate for all repos to have this.

Accepting my own answer, but would love some insight into whether this is a good idea, or why it may have worked initially.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

50 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you