glacials / splits-io

a speedrunning data store and analysis engine
https://splits.io
GNU Affero General Public License v3.0
133 stars 27 forks source link

Allow trials without credit cards #737

Closed glacials closed 3 years ago

glacials commented 3 years ago

Currently trial subscriptions are handled completely by Stripe, and they don't have an option to allow them without entering payment information first.

This branch moves trial subscriptions to be handled by us, so that we don't need to have that requirement in place.

It also refactors the code that decides which users have which features, because it was getting pretty muddy having so many features with so many possible grantors of that feature. Now, each model that can grant a feature (Subscription, PatreonUser, and now SubscriptionTrial) has the same interface and can be easily queried en masse by User.

Also letting some more rufo lint leak through. I'm pretty confident I want us to switch to it.

Fixes #732.