move anonymous user to seperate file

This commit is contained in:
Patrick Jentsch 2024-05-27 09:23:08 +02:00
parent 562b8d5ce0
commit 32fa632961
2 changed files with 11 additions and 9 deletions

View File

@ -1,7 +1,7 @@
from enum import Enum
from flask_login import AnonymousUserMixin
from app import db, login, mail, socketio
from app.email import create_message
from .anonymous_user import *
from .avatar import *
from .corpus_file import *
from .corpus_follower_association import *
@ -142,14 +142,6 @@ def job_after_update_handler(mapper, connection, job):
mail.send(msg)
class AnonymousUser(AnonymousUserMixin):
def can(self, permissions):
return False
@property
def is_administrator(self):
return False
login.anonymous_user = AnonymousUser

View File

@ -0,0 +1,10 @@
from flask_login import AnonymousUserMixin
class AnonymousUser(AnonymousUserMixin):
def can(self, permissions):
return False
@property
def is_administrator(self):
return False