membermatters / MemberMatters

An open source membership, access and payments portal for makerspaces and community groups.
https://membermatters.org
MIT License
40 stars 23 forks source link

Enable canvas induction via a feature flag #189

Closed proffalken closed 1 year ago

proffalken commented 1 year ago

An initial attempt to resolve #186, this PR adds a new config flag in Constance to enable inductions via Canvas and sets it to True by default to ensure that behaviour remains the same as the current way of working.

Setting it to False allows Maker/Hackspaces that do not have courses setup in Canvas to skip this step but still allow members to become active within the platform.

This almost certainly needs more work and some better testing as I'm hitting an error right at the end about an existing member profile: image

jabelone commented 1 year ago

You'll see that error when you already have an active Stripe subscription on your user profile and try to go through the final steps of the signup flow. This is meant to be a "safety catch" in case a member ends up in a weird state so we don't allow them to continue without human oversight/intervention. I think it should be ok to remove this check, but will need to verify the signup flow still works properly first.

jabelone commented 1 year ago

Heya @proffalken I just realised a much easier way to achieve the same functionality is to simply set the config option MAX_INDUCTION_DAYS to 0. This will do the exact same thing as your suggested change (skip that code block).

Your PR is a more explicit way of turning off canvas though so let's also add it. I'm also happy to accept your change as-is, as if that config option is used, it will behave the same way as setting MAX_INDUCTION_DAYS to 0 so no further testing should be necessary.

jabelone commented 1 year ago

@proffalken just circling back to that error you are hitting. I've removed that check and everything is still working, so we should be ok to leave it like that. I've just pushed it to dev - can you let me know if this is working for you now? Cheers!