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

Create Table: permission_type #24

Closed
13 of 21 tasks
Tracked by #35 ...
Neecolaa opened this issue Aug 21, 2022 · 11 comments · Fixed by #201
Closed
13 of 21 tasks
Tracked by #35 ...

Create Table: permission_type #24

Neecolaa opened this issue Aug 21, 2022 · 11 comments · Fixed by #201
Assignees
Labels
complexity: missing feature: table creation p-feature: permissions PII: TRUE Table or function has or uses Personally Identifiable Information (PII) role: back end s: CTJ stakeholder: Civic Tech Jobs s: VRMS stakeholder: VRMS size: 2pt Can be done in 7-12 hours

Comments

@Neecolaa
Copy link
Member

Neecolaa commented Aug 21, 2022

Dependency

Overview

We need to create the permission_type table so that we can update a shared data store across hackforla.org, vrms, civictechjobs, and tables (onboarding) project.

Details

A table and a model are the same thing

Action Items

  • identify and document table description (see spreadsheet under Resources)
id name description
  adminGlobal Can CRUD anything
  adminVrms Can R anything and update permissions for users to the level of Admin Brigade
  adminBrigade Can CRUD anything related to a user or project assigned to their brigade
  adminProject Can Read and Update anything related to their assigned project
  memberProject Can Read anything related to their project that is visible
  memberGeneral Can express interest in a project's open role if they are the role
  • compare and check off the data fields (below) against the ERD. Note any fields in the ERD that's missing from the list. (see Resources)

  • compare the check off associated tables (below) against the ERD. Note any associated tables in the ERD that's missing from the list (see Resources)

  • create a single model in Django (defining schema)

  • add seed data

  • write a test for the relationships this model will have with other models (e.g., creating a user and assigning them a set of permissions on a project).

  • write an API end point
    image

  • write API unit tests

  • document the endpoint

Resources/Instructions

Description

Dictionary of permission types used in #22

Data Fields

  1. Copied from spreadsheet and checked off according to ERD. (unchecked items indicate a mismatch between ERD and spreadsheet, which requires a review)

    • (PK) id - int - Record Id
    • name - varchar
    • description - varchar
  2. In ERD only (having items here indicates a mismatch, which requires a review)

    • None

Associated Tables

  1. Copied from spreadsheet and checked off according to ERD. (unchecked items indicate a mismatch between ERD and spreadsheet, which requires a review)

    • permission (one-to-many)
    • permission_history (one-to-many)
  2. In ERD only (having items here indicates a mismatch, which requires a review)

    • None
@Neecolaa
Copy link
Member Author

Currently, this table isn't storing what each permission allows, nor is that information being stored somewhere else. Do we want to store the CRUD information here? Could use booleans (can_create, can_read, can_update, can_delete), it would depend on how we want to set up permissions

@fyliu fyliu mentioned this issue Aug 25, 2022
39 tasks
@fyliu fyliu added this to the All tables added milestone Sep 25, 2022
@ExperimentsInHonesty ExperimentsInHonesty added p-feature: permissions s: CTJ stakeholder: Civic Tech Jobs s: VRMS stakeholder: VRMS and removed MVP-1 labels Mar 4, 2023
@fyliu fyliu self-assigned this Apr 10, 2023
@fyliu

This comment was marked as resolved.

@fyliu fyliu removed their assignment Apr 10, 2023
@fyliu fyliu mentioned this issue Apr 10, 2023
19 tasks
@ExperimentsInHonesty ExperimentsInHonesty added the PII: TRUE Table or function has or uses Personally Identifiable Information (PII) label May 4, 2023
@joey-ma joey-ma assigned joey-ma and unassigned joey-ma May 4, 2023
@ExperimentsInHonesty ExperimentsInHonesty added the dependency Issue has dependencies label May 5, 2023
@joey-ma joey-ma self-assigned this May 5, 2023
@joey-ma

This comment was marked as resolved.

@fyliu fyliu mentioned this issue May 17, 2023
4 tasks
@fyliu

This comment was marked as resolved.

@joey-ma
Copy link
Member

joey-ma commented May 18, 2023

Handling permissions definitely is complex and complicated. I'd love to investigate more on how everything relates to each other to get clarity. Might be hard with the new job, but I'll try to be at the meeting tomorrow a bit after 5pm.

@ExperimentsInHonesty

This comment was marked as resolved.

@ExperimentsInHonesty ExperimentsInHonesty removed the dependency Issue has dependencies label May 19, 2023
@fyliu
Copy link
Member

fyliu commented Aug 11, 2023

I'm unassigning @joey-ma in case anyone wants to work on this.

Be aware that Joey has done previous work on this in draft PR #158. Anyone working on this should try to preserve the work that's already done by checking out that branch and continuing from there rather than start from scratch.

@ExperimentsInHonesty
Copy link
Member

@alexlaw528
Please provide update

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures or links* (if necessary): "Add any pictures or links that will help illustrate what you are working on."
  • remember to add links to the top of the issue if they are going to be needed again.

@alexlaw528
Copy link
Member

@ExperimentsInHonesty

  1. Progress - Still working on getting comfortable with Django.
  2. Blockers - None at the moment.
  3. Availability - Will have 4-6 hrs this weekend to work on this.
  4. ETA - Hoping to complete by end of next weekend (9/24)

@alexlaw528
Copy link
Member

@fyliu - can you review PR #201?

Some of the other requests in this issue will likely require updating to include custom permission. But that seems out of scope of this issue.

@fyliu fyliu linked a pull request Oct 5, 2023 that will close this issue
@fyliu
Copy link
Member

fyliu commented Oct 5, 2023

Closing issue since the PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: missing feature: table creation p-feature: permissions PII: TRUE Table or function has or uses Personally Identifiable Information (PII) role: back end s: CTJ stakeholder: Civic Tech Jobs s: VRMS stakeholder: VRMS size: 2pt Can be done in 7-12 hours
Projects
Status: ✅Done
Development

Successfully merging a pull request may close this issue.

5 participants