feat: enforce feature ownership project setting#7067
Merged
gagantrivedi merged 10 commits intomainfrom Apr 3, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
aca43a4 to
1749d8d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7067 +/- ##
========================================
Coverage 98.33% 98.34%
========================================
Files 1337 1336 -1
Lines 50010 50132 +122
========================================
+ Hits 49178 49302 +124
+ Misses 832 830 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4c3aa8f to
a8b419f
Compare
Add an `enforce_feature_owners` boolean on the Project model. When enabled, feature creation requires at least one user or group owner. The owners/group_owners fields on CreateFeatureSerializer are now asymmetric PrimaryKeyRelatedFields (accept IDs on write, return nested objects on read). The remove-owners and remove-group-owners endpoints also prevent removing the last owner when enforcement is on. Frontend adds the project setting toggle, a FeatureOwnerSelect component for the creation modal, create-button validation, and owner chips in the feature modal header.
f9b43dc to
ca55b0d
Compare
…ture_owners - Switch all new tests from deprecated admin_client_original to admin_client_new so they run as both user and master API key - Extract enforcement check into private method
for more information, see https://pre-commit.ci
Merge extra __ segments into the condition part to satisfy the
FT003 lint rule: test_{subject}__{condition}__{expected}.
Already covered by admin_client_new parametrisation on test_create_feature__enforce_owners_enabled_no_owners__returns_400.
Already covered by existing test_remove_owners__specified_owner__removes_only_specified.
Zaimwa9
requested changes
Mar 31, 2026
Contributor
Zaimwa9
left a comment
There was a problem hiding this comment.
Overall good and well working. Couple of comments:
- One refactor sorry but that's part of becoming a frontend 😅
- Couple of questions regarding new UI elements (to be hidden or not depending on the config)
- One backend NIT
Otherwise good job
- Migrate FlagOwners.js and FlagOwnerGroups.js to functional TSX components with RTK Query, supporting dual mode (edit via API, create via parent callbacks) - Delete FeatureOwnerSelect.tsx (replaced by refactored components) - Remove tooltips from modal header owner chips - Gate owner chips and create-form picker on enforce_feature_owners
khvn26
previously approved these changes
Apr 1, 2026
4 tasks
gagantrivedi
pushed a commit
that referenced
this pull request
Apr 3, 2026
Address review feedback from PR #7067: - Include user IDs in error message when users don't have project access - Include group IDs in error message when groups belong to wrong organisation This helps users understand exactly which owners/groups are invalid.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #4432
Add a project-level
enforce_feature_ownerssetting. When enabled:owners/group_ownersfields on the create serialiser now accept IDs on write and return nested objects on read (asymmetric PrimaryKeyRelatedField — no API contract break)How did you test this code?