-
-
Notifications
You must be signed in to change notification settings - Fork 196
Description
Is your feature request related to a problem? Please describe.
Currently, OWASP Nest defines a leaders many-to-many field for Project, Chapter, and Committee models via owasp.models.common.RepositoryBasedEntityModel.
However, these leader relations are currently empty and don’t support detailed tracking.
We should replace the current leaders relation with a new EntityLeader model that can represent leadership roles for OWASP entities more flexibly.
Describe the solution you'd like
Proposed changes:
-
Model changes
-
Remove the current
leaders
M2M field fromRepositoryBasedEntityModel
. -
Create a new
EntityLeader
model with the following fields:- entity – Reference to the OWASP entity (object type + object ID using a GenericForeignKey)
- leader – ForeignKey to
github.User
- description – Optional text field for role/description
- order – Positive integer field to determine display/priority order of leaders
- is_reviewed – Boolean field to indicate whether the leadership assignment has been verified/reviewed
-
Constraints:
- Enforce uniqueness for a leader within a specific OWASP entity (
unique_together
onentity
+leader
).
- Enforce uniqueness for a leader within a specific OWASP entity (
-
-
Data sync changes
-
Update the
github_match_users.py
management command to work with the newEntityLeader
structure. -
Use this script to populate
EntityLeader
records for Chapters, Committees, and Projects based on GitHub data. -
Ensure the script supports:
- Initial bulk population of data
- Marking records for manual review/approval (set
is_reviewed=False
initially) - Maintaining bulk action support for efficiency
-
Notes:
is_reviewed
should default toFalse
for newly created records from the script- Consider indexing
entity
andleader
for performance - Migration should remove the old
leaders
M2M field cleanly
Metadata
Metadata
Assignees
Labels
Type
Projects
Status