fix: Add validation for interest groups and fix execom roster leaks#3061
Conversation
feat: add validation for interest groups selection limit in UserDetai…
fix(campus): execom roster no longer leaks non-execom UserRoleLink rows
fix: Scope execom roster to actual appointments and fix leaks
Greptile SummaryThis PR replaces title-based execom detection with explicit role classification and adds interest-group validation. The main changes are:
|
| Filename | Overview |
|---|---|
| db/user.py | Adds an unmanaged Role field without the required physical schema change. |
| api/dashboard/campus/events_views.py | Uses the new execom flag for roster filtering and role assignment without backfilling existing roles. |
| api/dashboard/campus/dash_campus_helper.py | Classifies newly created or updated IG campus-lead roles as execom roles. |
| api/dashboard/ig/dash_ig_view.py | Adds execom classification to roles created with an interest group. |
| api/dashboard/user/dash_user_serializer.py | Limits the submitted interest-group list to three entries. |
Reviews (1): Last reviewed commit: "Merge pull request #3059 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) |
There was a problem hiding this comment.
| ).exclude( | ||
| role__title__in=BLACKLIST_ROLES | ||
| user_id__in=campus_user_ids, | ||
| role__is_execom_role=True, |
There was a problem hiding this comment.
Legacy Execom Roles Stay Unclassified
The new column defaults to false, and this PR does not backfill existing custom execom or IG campus-lead roles. Once the column exists, members holding those roles disappear from the roster even though the old blacklist included them; the assignment path also rejects their existing role titles as non-execom.
No description provided.