Skip to content

Let application Owners create instances from the team pages - #8874

Merged
hardillb merged 5 commits into
mainfrom
8870-app-owner-create-instance
Oct 9, 2026
Merged

hardillb merged 5 commits into
mainfrom
8870-app-owner-create-instance

Conversation

@cstns

@cstns cstns commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #8870

A team Member with Owner access on an application couldn't create an instance from the team pages. The Add Instance button on team Home and the Create Instance buttons on team Hosted Instances were greyed out with "Your role does not allow creating new instances". Creating from the application's own Hosted Instances tab already worked, and so does the team create form if you open it by URL, since it only lists the applications you're allowed to create in. So it was just the buttons.

Added a small hasPermissionInAnyApplication helper next to hasPermission: true if the team role allows it, or if any application the user has a role on allows it. The three team-level buttons use it now.

Note the Add Instance button on team Home is only on the classic home, which shows when the team has AI features turned off. With AI on, Home is the Expert home and has no such button.

Not touched here: team Home also has an Add Instance button for remote instances (device:create) with the same gap, might be worth a separate look.

Checked locally in the UI:

User Team Home "Add Instance" Team Hosted Instances "Create Instance"
team Member, app Owner (before) disabled disabled
team Member, app Owner (after) enabled enabled
team Member, no app roles (after) n/a disabled
team Owner (after) enabled enabled

As the team Member / app Owner I also went through the whole flow from team Hosted Instances: Create Instance, picked the application (only the one they own is listed), Small, Create. POST /api/v1/projects came back 200 and it landed on the new instance. Unit tests added for the helper, lint passes.

The Add Instance button on team Home and the Create Instance buttons on team Hosted Instances only checked the team role, so a team Member with Owner access on an application saw them disabled. They now allow it when the team role or any application role permits it. The create form already only lists applications the user can create in.
@cstns cstns self-assigned this Oct 9, 2026
@cstns
cstns deployed to staging October 9, 2026 10:26 — with GitHub Actions Active
@cstns
cstns marked this pull request as ready for review October 9, 2026 10:28
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.54%. Comparing base (ec9a0e4) to head (50508c3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8874   +/-   ##
=======================================
  Coverage   78.54%   78.54%           
=======================================
  Files         475      475           
  Lines       25760    25760           
  Branches     6857     6857           
=======================================
  Hits        20234    20234           
  Misses       5526     5526           
Flag Coverage Δ
backend 78.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…cation

The member in this spec has the Owner role on application-5, so with application Owners now able to create instances the button is enabled for them.
@cstns
cstns requested a review from hardillb October 9, 2026 11:31
@cstns
cstns deployed to staging October 9, 2026 11:34 — with GitHub Actions Active
@cstns
cstns deployed to staging October 9, 2026 11:52 — with GitHub Actions Active
cstns added 2 commits October 9, 2026 15:11
…cation

Same as the member spec, the viewer here has the Owner role on application-5, so the create button is enabled for them now.
@cstns
cstns deployed to staging October 9, 2026 12:15 — with GitHub Actions Active
@hardillb
hardillb merged commit 25eb62a into main Oct 9, 2026
29 checks passed
@hardillb
hardillb deleted the 8870-app-owner-create-instance branch October 9, 2026 16:40

This branch was successfully deployed

1 active deployment
staging — 50508c34 Deployed Oct 9, 2026 by hardillb via Remove application #12361
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application level RBAC does not allow Application level "Owner" to create new instance

2 participants