You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
244 B
9 lines
244 B
5 months ago
|
from flask_login import current_user
|
||
|
from models.user_model import User
|
||
|
|
||
|
def is_adminuser():
|
||
|
if not current_user.is_authenticated:
|
||
|
return False
|
||
|
user = User.query.filter_by(email=current_user.email).first()
|
||
|
return user.admin
|