mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 19:04:18 +00:00
move anonymous user to seperate file
This commit is contained in:
parent
562b8d5ce0
commit
32fa632961
@ -1,7 +1,7 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from flask_login import AnonymousUserMixin
|
|
||||||
from app import db, login, mail, socketio
|
from app import db, login, mail, socketio
|
||||||
from app.email import create_message
|
from app.email import create_message
|
||||||
|
from .anonymous_user import *
|
||||||
from .avatar import *
|
from .avatar import *
|
||||||
from .corpus_file import *
|
from .corpus_file import *
|
||||||
from .corpus_follower_association import *
|
from .corpus_follower_association import *
|
||||||
@ -142,14 +142,6 @@ def job_after_update_handler(mapper, connection, job):
|
|||||||
mail.send(msg)
|
mail.send(msg)
|
||||||
|
|
||||||
|
|
||||||
class AnonymousUser(AnonymousUserMixin):
|
|
||||||
def can(self, permissions):
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def is_administrator(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
login.anonymous_user = AnonymousUser
|
login.anonymous_user = AnonymousUser
|
||||||
|
|
||||||
|
|
||||||
|
10
app/models/anonymous_user.py
Normal file
10
app/models/anonymous_user.py
Normal 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
|
Loading…
Reference in New Issue
Block a user