Merge pull request #1010 from simple-login/fix-upgrade

do not show upgrade button for lifetime user
This commit is contained in:
Son Nguyen Kim 2022-05-20 15:16:38 +02:00 committed by GitHub
commit a90e880b24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -640,6 +640,9 @@ class User(Base, ModelMixin, UserMixin, PasswordOracle):
return False
def should_show_upgrade_button(self):
if self.lifetime:
return False
if self.lifetime_or_active_subscription():
# user who has canceled can also re-subscribe
sub: Subscription = self.get_subscription()