Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Contributor Role #284

Closed
DMalone87 opened this issue Jul 11, 2023 · 2 comments
Closed

[FEATURE] Contributor Role #284

DMalone87 opened this issue Jul 11, 2023 · 2 comments
Assignees

Comments

@DMalone87
Copy link
Collaborator

DMalone87 commented Jul 11, 2023

Is your feature request related to a problem? Please describe.
One of the core functions of the index is to create a system of data provenance for the information that is submitted to or collected by the index. Every recorded incident must also have a source. Currently, incidents can be created without any attribution by any user with access to the API. This needs to change.

Describe the solution you'd like

  • The "Contributor" role should be added.
  • Only users with the "Contributor" role should be allowed to create new incident records.
  • Each Contributor must be attached to a "Source." This source represents the organization that the contributor user is submitting data on behalf of.
  • When a user uses any API that creates a new Incident record, that record should automatically be created with the correct "Source" reference as well as a "Source Details" record.

Additional context
NPDC Incident Model

@DMalone87
Copy link
Collaborator Author

Scoped out a source<>user association for the DB. I think we may want to just make it a many-many. Gives us options for subscribing to a source.

https://github.com/codeforboston/police-data-trust/tree/dkmalone/source_members

mnuzzose added a commit to mnuzzose/police-data-trust that referenced this issue Jul 24, 2023
…TOR role and updates the unit tests to use a contributor user.
mnuzzose added a commit to mnuzzose/police-data-trust that referenced this issue Jul 25, 2023
… before continuing. Will now update unit tests.
mnuzzose added a commit to mnuzzose/police-data-trust that referenced this issue Jul 25, 2023
mnuzzose added a commit to mnuzzose/police-data-trust that referenced this issue Aug 2, 2023
mnuzzose added a commit to mnuzzose/police-data-trust that referenced this issue Aug 4, 2023
DMalone87 added a commit that referenced this issue Aug 8, 2023
* #284 - Updated the Create endpoint to require a CONTRIBUTOR role and updates the unit tests to use a contributor user.

* Adds member list to source. Commented out.
Need to find a way to associate the user.
Also adds member roles.

* #284 - Added a check for the contributor having a source before continuing. Will now update unit tests.

* #284 - Updated the unit tests to add a source for the contributor user

* #284 - Renaming 'Source' to 'Organization' to match how the front-end refers to the concept.

* #284 - Fixed style issues.

---------

Co-authored-by: Darrell Malone Jr <[email protected]>
@DMalone87
Copy link
Collaborator Author

Nicely done, @mnuzzose !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants