Skip to content

Replace leaders M2M field with EntityMember model to track OWASP entity leaders #2017

@arkid15r

Description

@arkid15r

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:

  1. Model changes

    • Remove the current leaders M2M field from RepositoryBasedEntityModel.

    • 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 on entity + leader).
  2. Data sync changes

    • Update the github_match_users.py management command to work with the new EntityLeader 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 to False for newly created records from the script
  • Consider indexing entity and leader for performance
  • Migration should remove the old leaders M2M field cleanly

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions