Skip to content

Feature: 15605 merge inherited queries and policies#18801

Merged
RachelElysia merged 10 commits intomainfrom
15605-merge-inherited-queries-and-policies
May 7, 2024
Merged

Feature: 15605 merge inherited queries and policies#18801
RachelElysia merged 10 commits intomainfrom
15605-merge-inherited-queries-and-policies

Conversation

@RachelElysia
Copy link
Copy Markdown
Member

@RachelElysia RachelElysia commented May 7, 2024

Squash and merged Feature: 15605 merge inherited queries and policies #18771
Reverted with #18800

Note

This is the Unsquashed merge

Issue

Feature branch including all frontend and backend of #15605

Description

Merging this feature branch (15605-merge-inherited-queries-and-policies) into main includes the following commits that are all went through review and approval cycles:

Commits, authors, and approvers

RachelElysia and others added 10 commits May 6, 2024 12:26
#17745 

implement `merge_inherited` on the list queries endpoint to combine team
and inherited queries.

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality

---------

Co-authored-by: RachelElysia <rachel@fleetdm.com>
#17744 

This change implements a new query parameter on `/teams/%d/policies` to
merge inherited policies into the policies array instead of listing them
separately. The frontend will key off the existing `team_id` field to
mark policies as "inherited" in theUI.

I opted for an additive approach in adding a datastore method rather
than modifying the existing ListTeamPolicies to avoid a large test
refactor.

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality

---------

Co-authored-by: RachelElysia <rachel@fleetdm.com>
#17744 

This adds the `merged_inherited` query param to
`/teams/:id/policies/count` related to
#18564

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality

---------

Co-authored-by: RachelElysia <rachel@fleetdm.com>
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
@RachelElysia RachelElysia requested review from a team as code owners May 7, 2024 16:49
@RachelElysia RachelElysia merged commit 9e66ef6 into main May 7, 2024
@RachelElysia RachelElysia deleted the 15605-merge-inherited-queries-and-policies branch May 7, 2024 17:07
@RachelElysia RachelElysia restored the 15605-merge-inherited-queries-and-policies branch May 7, 2024 17:15
mostlikelee added a commit that referenced this pull request May 8, 2024
@RachelElysia RachelElysia deleted the 15605-merge-inherited-queries-and-policies branch April 7, 2026 19:17
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.

4 participants