Coder Social home page Coder Social logo

Comments (7)

thekaveman avatar thekaveman commented on August 28, 2024 1

@lalver1 yes you are absolutely right -- since that attribute is calculated from the others that are moving, it should be moved too.

And it looks like the same goes for ClaimsProvider.client_id which is calculating from ClaimsProvider.client_id_secret_name which is also moving.

Remember the ultimate goal here is #2236 where all the details relevant to the specific flow are going to be on the EnrollmentFlow model. So that will include these fields/attributes we're discussing here.

from benefits.

lalver1 avatar lalver1 commented on August 28, 2024 1

Perfect, I'll edit the acceptance criteria whenever it is helpful to track these changes, thanks!

from benefits.

thekaveman avatar thekaveman commented on August 28, 2024 1

@lalver1 when you have a branch with a migration file, can you push that up please? I want to start #2282 from your work.

from benefits.

lalver1 avatar lalver1 commented on August 28, 2024 1

Thanks @thekaveman , yep I was wondering about that second part so that makes sense that client_id_secret_name is not moving.

In case it helps, I created a draft PR with the first part of this refactor, moving scope and claim from ClaimsProvider to EligibilityVerifier. But the migration file is not finished since I'm missing the parts below. You'll see comments in parts of the code I am still working on:

  • scope and claim data migration ✅
  • admin permissions update
  • add EligibilityVerifier.claims_scheme as optional (leave as required on ClaimsProvider) ✅
  • updating tests ✅
  • updating documentation

from benefits.

lalver1 avatar lalver1 commented on August 28, 2024

@thekaveman , would it also make sense to add

  • ClaimsProvider.supports_claims_verification moved to EligibilityVerifier.supports_claims_verification

to the acceptance criteria since it is a model attribute (managed, but I guess still technically an attribute)? Also, since scope and claim have been moved to EligibilityVerifier, it seems that supports_claims_verification should also move to EligibilityVerifier?

If not, I think it is possible to keep ClaimsProvider.supports_claims_verification by adding a eligibility_verifiers = models.OneToOneField("EligibilityVerifier", null=True, on_delete=models.CASCADE) attribute to ClaimsProvider (or something similar to get scope and claim from EligibilityVerifier) but I have a feeling this is not too logical since scope and claim have been moved to EligibilityVerifier and the better solution is the one described above?

from benefits.

thekaveman avatar thekaveman commented on August 28, 2024

@lalver1 I was partially wrong here, sorry about that:

@lalver1 yes you are absolutely right -- since that attribute is calculated from the others that are moving, it should be moved too.

And it looks like the same goes for ClaimsProvider.client_id which is calculating from ClaimsProvider.client_id_secret_name which is also moving.

Remember the ultimate goal here is #2236 where all the details relevant to the specific flow are going to be on the EnrollmentFlow model. So that will include these fields/attributes we're discussing here.

This is wrong:

And it looks like the same goes for ClaimsProvider.client_id which is calculating from ClaimsProvider.client_id_secret_name which is also moving.

client_id_secret_name is not moving.

from benefits.

lalver1 avatar lalver1 commented on August 28, 2024

Quick update on this ticket @thekaveman, the draft PR is almost ready for a review. I still need to update:

  • model fixtures
  • documentation
  • take one more look at the admin permissions update. Since scheme is still in ClaimsProvider the scheme read only field will not change but I think I need to set EligibilityVerifier.claims_scheme as another read only field in the admin permissions.

from benefits.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.