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

Model refactor: rename EligibilityVerifier to EnrollmentFlow #2282

Closed
11 tasks done
Tracked by #2236 ...
thekaveman opened this issue Aug 6, 2024 · 0 comments · Fixed by #2293
Closed
11 tasks done
Tracked by #2236 ...

Model refactor: rename EligibilityVerifier to EnrollmentFlow #2282

thekaveman opened this issue Aug 6, 2024 · 0 comments · Fixed by #2293
Assignees
Labels
back-end Django views, sessions, middleware, models, migrations etc. chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc.

Comments

@thekaveman
Copy link
Member

thekaveman commented Aug 6, 2024

Acceptance criteria

  • A new model exists called EnrollmentFlow
  • Each field in the model definition has a description
  • Fields from EligibilityVerifier are moved and renamed:
      display_order = models.PositiveSmallIntegerField(default=0, blank=False, null=False)
      help_template = models.TextField(null=True, blank=True)
      selection_label_template = models.TextField()
      eligibility_start_template = models.TextField(null=True, blank=True)
      eligibility_unverified_template = models.TextField(null=True, blank=True)
      eligibility_form_class = models.TextField(null=True, blank=True)
      eligibility_api_url = models.TextField(null=True, blank=True)
      eligibility_api_auth_header = models.TextField(null=True, blank=True)
      eligibility_api_auth_key_secret_name = SecretNameField(null=True, blank=True)
      eligibility_api_public_key = models.ForeignKey(PemData, related_name="+", on_delete=models.PROTECT, null=True, blank=True)
      eligibility_api_jwe_cek_enc = models.TextField(null=True, blank=True)
      eligibility_api_jwe_encryption_alg = models.TextField(null=True, blank=True)
      eligibility_api_jws_signing_alg = models.TextField(null=True, blank=True)
      claims_provider = models.ForeignKey(ClaimsProvider, on_delete=models.PROTECT, null=True, blank=True)
      claims_scope = models.TextField(null=True, blank=True)
      claims_claim = models.TextField(null=True, blank=True)
      claims_scheme = models.TextField()
  • active field from EligibilityVerifier is dropped and not used on EnrollmentFlow
  • The model for EligibilityVerifier no longer exists
  • TransitAgency.eligibility_verifiers field renamed to TransitAgency.enrollment_flows
  • View permissions updated for the new model
  • Edit permissions updated for the new model
  • EligibilityVerifier field exclusions moved to the new model
  • EligibilityVerifier read-only fields moved to the new model

Impact on existing data

  • Standard migrations for model/field renames should maintain existing data (including for TransitAgency.eligibility_verifiers --> TransitAgency.enrollment_flows)
@thekaveman thekaveman changed the title Rename EligibilityVerifier to EnrollmentFlow Model refactor: Rename EligibilityVerifier to EnrollmentFlow Aug 6, 2024
@thekaveman thekaveman added chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc. back-end Django views, sessions, middleware, models, migrations etc. labels Aug 6, 2024
@thekaveman thekaveman added this to the Admin tool: agency users milestone Aug 6, 2024
@thekaveman thekaveman changed the title Model refactor: Rename EligibilityVerifier to EnrollmentFlow Model refactor: rename EligibilityVerifier to EnrollmentFlow Aug 6, 2024
@thekaveman thekaveman self-assigned this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Django views, sessions, middleware, models, migrations etc. chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant