Hide Account Provisioning on Fleet free - #50130
Conversation
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughAccount 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)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
<!-- 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
Related issue: Resolves #50122
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/oree/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
Added/updated automated tests
Where appropriate, automated tests simulate multiple hosts and test for host isolation (updates to one hosts's records do not affect another)
QA'd all new/changed functionality manually
For unreleased bug fixes in a release candidate, one of:
Summary by CodeRabbit
New Features
Bug Fixes