Skip to content

48343 edit config profile UI - #49333

Merged
JordanMontgomery merged 47 commits into
mainfrom
48343-edit-config-profile-ui
Jul 21, 2026
Merged

48343 edit config profile UI#49333
JordanMontgomery merged 47 commits into
mainfrom
48343-edit-config-profile-ui

Conversation

@JordanMontgomery

@JordanMontgomery JordanMontgomery commented Jul 15, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #48343

Checklist for submitter

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

No changes file as this is covered by the base feature branch

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

  • 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

Summary by CodeRabbit

  • New Features
    • Added an edit flow for configuration profiles, supporting profile content updates plus label targeting.
    • Added an edit modal with file-type validation and premium/free tier-aware target controls.
    • Updated the activity feed and filter labels for edited configuration/declaration profiles, including clearer single- vs batch-edit messaging.
    • Reworked configuration profile actions to include an edit option (with technician restrictions).
  • Bug Fixes
    • Improved label summary caching so label data refreshes correctly when switching teams.

andymFleet and others added 29 commits July 2, 2026 15:51
Edit profile modal (contents and/or labels), pencil row action replacing
the labels-filter button per design, updateProfile API client, and the
edited_configuration_profile activity in the global feed.
- Premium-gate team resolution in the profile update and delete paths:
  svc.EnterpriseOverrides is nil on Fleet Free, so team-scoped edits and
  deletes panicked after a premium-to-free downgrade
- Preserve Fleet-variable associations on labels-only edits (Apple,
  Windows, DDM) -- clearing them broke variable-driven redelivery
- Enforce PayloadScope conflicts and cross-platform name uniqueness on
  Apple profile content edits, matching the create/GitOps paths
- Route post-update reads to the primary DB and dedupe the labels-only
  validation blocks
Main introduced Android profile Fleet-variable tracking and a DDM scope
column after the edit endpoint was written:
- UpdateMDMAndroidConfigProfile now takes usesFleetVars and applies the
  same content-only variable-association semantics as Apple/Windows
- a labels-only DDM edit carries the existing scope so the upsert's
  unconditional scope write can't clear it
andymFleet
andymFleet previously approved these changes Jul 20, 2026

@andymFleet andymFleet 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.

On the whole looks good to me. Just a small question on one Gitops tooltip and some suggested test coverage for the allowed file extensions. See comments.

MagnusHJensen
MagnusHJensen previously approved these changes Jul 21, 2026

@MagnusHJensen MagnusHJensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from 48342-edit-config-profile-endpoint to main July 21, 2026 12:20
@JordanMontgomery
JordanMontgomery dismissed stale reviews from MagnusHJensen and andymFleet July 21, 2026 12:20

The base branch was changed.

@JordanMontgomery
JordanMontgomery requested a review from a team as a code owner July 21, 2026 12:20
@JordanMontgomery
JordanMontgomery merged commit bd8f1e8 into main Jul 21, 2026
13 of 14 checks passed
@JordanMontgomery
JordanMontgomery deleted the 48343-edit-config-profile-ui branch July 21, 2026 12:24
JordanMontgomery added a commit that referenced this pull request Jul 21, 2026
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #48342 & #48343 

Cherrypick of #49141 and
#49333

# Checklist for submitter

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

- [x] 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.

- [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
- [x] 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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added the ability to edit existing Apple, Windows, Android, and Apple
DDM configuration profiles.
- Profile content can be replaced, or label targeting can be updated
without changing the profile file.
  - Added an edit action and modal to the configuration profile list.
- Improved activity feed messages for individual and batch profile
edits.
- **Bug Fixes**
- Improved validation, error messages, profile size handling, and
activity tracking during edits.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Andrew Mellor <andrewmellor@fleetdm.com>
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.

ECP: Frontend

4 participants