Created
January 22, 2020 16:55
-
-
Save Porter97/185e6e9f681a240c442070f6578d315c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User(db.Model, UserMixin): | |
#... | |
class AnonymousUser(AnonymousUserMixin): | |
def can(self, permissions): | |
return False | |
def is_administrator(self): | |
return False | |
login_manager.anonymous_user = AnonymousUser | |
@login_manager.user_loader | |
def load_user(user_id): | |
#... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment