Skip to content

Update Table: UserPermission #577

@ExperimentsInHonesty

Description

@ExperimentsInHonesty

Overview

We need to update the UserPermission table model to include new fields, update the field names, and change the table name.

Details

Action Items

  • Update existing Django model
  • update table name from userpermission to permission
    • this will involve finding every place in the code where the table is referenced and changing it.
  • In the files indicated by Resource 1.01, Change the following items in the code
Current Name in code Updated Name Updated Type (may already be this type) FK Table FK Table Issue(s)
permission_type_id permission_type int PermissionType #24
practice_area_id practice_area int PracticeArea #63
project_id project int Project --
user_id user int User --
  • Add the following items in the code
Name Type FK Table FK Table Issue(s)
created_by int user #15 & #429 & #172
ended DateTimeField -- --
ranted DateTimeField -- --
updated_by int user #15 & #429 & #172
  • Check to see if open issues in FK status below

    • If all Issues listed are closed (or there are no FKs), then skip the next 3 steps
      • comment out the code after you create it (see FK Status below for open/closed state)
      • add an action item on the open issue to uncomment the code line you commented out when that issue's table is created.
      • Provide your file and line number as a permalink under resources in that issue
  • Write a test for the new relationships this model will have with other models (e.g., creating a user and assigning them a set of permissions on a project) if any.

  • Update API end point

  • Update API unit tests

  • generate a schema table description (see resources 1.04), post it in a comment below, and add a link to it in the Update Schema dependency issue

  • Document the endpoint in ReDocs (see resources 1.05)

FK status

Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕New Issue Review

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions