Skip to content

Hide Account Provisioning on Fleet free - #50130

Merged
MagnusHJensen merged 1 commit into
mainfrom
50122-hide-account-prov-fleet-free
Jul 29, 2026
Merged

Hide Account Provisioning on Fleet free#50130
MagnusHJensen merged 1 commit into
mainfrom
50122-hide-account-prov-fleet-free

Conversation

@MagnusHJensen

@MagnusHJensen MagnusHJensen commented Jul 29, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #50122

image

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information. (Unreleased bug)

  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.

  • Timeouts are implemented and retries are limited to avoid infinite loops

  • If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes

Testing

For unreleased bug fixes in a release candidate, one of:

  • Confirmed that the fix is not expected to adversely impact load test results

Summary by CodeRabbit

  • New Features

    • Account provisioning settings now indicate when the feature is included with Fleet Premium.
    • Premium-tier accounts continue to see the full provisioning configuration and save controls.
  • Bug Fixes

    • Improved license-tier handling so account provisioning displays the appropriate experience for free and premium plans.

Copilot AI review requested due to automatic review settings July 29, 2026 10:10
@MagnusHJensen
MagnusHJensen requested a review from a team as a code owner July 29, 2026 10:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Fleet Free UX bug in the Admin → Integrations → Account provisioning card by gating the account provisioning form behind Fleet Premium and showing the standard paywall message on Free, preventing a confusing “editable form that always fails to save” experience.

Changes:

  • Added a Fleet Premium gate to Account provisioning using isPremiumTier(appConfig) and <PremiumFeatureMessage /> on Free.
  • Updated unit tests to run with a Premium license by default and added a Free-tier paywall test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
frontend/pages/admin/IntegrationsPage/cards/AccountProvisioning/AccountProvisioning.tsx Adds Premium gating to render <PremiumFeatureMessage /> on Free instead of the editable form.
frontend/pages/admin/IntegrationsPage/cards/AccountProvisioning/AccountProvisioning.tests.tsx Adds/updates tests to cover Free-tier paywall and ensure existing form tests run under Premium.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.07%. Comparing base (5983f9d) to head (b2193ae).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #50130   +/-   ##
=======================================
  Coverage   68.07%   68.07%           
=======================================
  Files        3936     3936           
  Lines      250572   250576    +4     
  Branches    13433    13437    +4     
=======================================
+ Hits       170565   170569    +4     
+ Misses      64696    64695    -1     
- Partials    15311    15312    +1     
Flag Coverage Δ
frontend 60.96% <100.00%> (+<0.01%) ⬆️

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.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e3b6804-2ec0-48c9-82a4-594e2b865391

📥 Commits

Reviewing files that changed from the base of the PR and between 5983f9d and b2193ae.

📒 Files selected for processing (2)
  • frontend/pages/admin/IntegrationsPage/cards/AccountProvisioning/AccountProvisioning.tests.tsx
  • frontend/pages/admin/IntegrationsPage/cards/AccountProvisioning/AccountProvisioning.tsx

Walkthrough

Account provisioning now checks the application license tier before rendering its settings form. Non-premium configurations display a Fleet Premium message, while premium configurations continue to show the existing provisioning fields and save controls. Tests now use explicit premium license fixtures and verify the free-tier message.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: hiding Account Provisioning on Fleet Free.
Description check ✅ Passed The description includes the related issue, checklist items, and testing notes, so it is mostly complete for this PR.
Linked Issues check ✅ Passed The PR implements the requested free-tier gate and premium notice for Account provisioning, matching issue #50122.
Out of Scope Changes check ✅ Passed The changes stay focused on the account provisioning UI and tests, with no obvious unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 50122-hide-account-prov-fleet-free

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MagnusHJensen
MagnusHJensen merged commit 451319b into main Jul 29, 2026
28 checks passed
@MagnusHJensen
MagnusHJensen deleted the 50122-hide-account-prov-fleet-free branch July 29, 2026 12:31
MagnusHJensen added a commit that referenced this pull request Jul 29, 2026
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #50122

Cherry picks: #50130

<img width="730" height="148" alt="image"

src="https://github.com/user-attachments/assets/e7a803bd-b50d-404f-8af2-9fa32cc34772"
/>


# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes

files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information. (Unreleased bug)

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.
- [x] Timeouts are implemented and retries are limited to avoid infinite
loops
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [ ] Where appropriate, [automated tests simulate multiple hosts and
test for host

isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [x] QA'd all new/changed functionality manually
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.

Account provisioning settings shows an editable form on Fleet Free instead of a Premium message

3 participants