Enhance validation and fix execom roster management - #3074
Closed
DevWithPranav wants to merge 8 commits into
Closed
Conversation
feat: add validation for interest groups selection limit in UserDetai…
feat: Create triage workflow and enhance task management features
fix(campus): execom roster no longer leaks non-execom UserRoleLink rows
fix: Scope execom roster to actual appointments and fix leaks
fix: Add validation for interest groups and fix execom roster leaks
Contributor
Greptile SummaryThis PR replaces the campus execom role blacklist with explicit role classification. The main changes are:
|
| Filename | Overview |
|---|---|
| db/user.py | Adds an unmanaged model field without the required database schema artifact. |
| api/dashboard/campus/events_views.py | Switches roster selection to explicit role classification without backfilling historical roles. |
| api/dashboard/campus/dash_campus_helper.py | Classifies newly created IG roles, but creation defaults do not update existing rows. |
| api/dashboard/ig/dash_ig_view.py | Adds classification values when creating new IG roles. |
Reviews (1): Last reviewed commit: "Merge pull request #3061 from gtech-mule..." | Re-trigger Greptile
| created_by = models.ForeignKey(User, on_delete=models.SET(settings.SYSTEM_ADMIN_ID), db_column='created_by', | ||
| related_name='role_created_by') | ||
| created_at = models.DateTimeField(auto_now_add=True) | ||
| is_execom_role = models.BooleanField(default=False) |
Contributor
Comment on lines
198
to
+200
| execom_links = UserRoleLink.objects.filter( | ||
| user_id__in=campus_user_ids | ||
| ).exclude( | ||
| role__title__in=BLACKLIST_ROLES | ||
| user_id__in=campus_user_ids, | ||
| role__is_execom_role=True, |
Contributor
There was a problem hiding this comment.
Historical Execom Roles Disappear
Existing Campus Lead, Lead Enabler, Enabler, and IG campus-lead rows predate this flag and are not backfilled here. Once the column exists with its false default, this positive filter removes their current holders from GET /campus/execom/, whereas the previous blacklist included them.
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.
No description provided.