2024-06-02 22:37:55 +02:00
|
|
|
from flask_login import current_user
|
|
|
|
from models.user_model import User
|
|
|
|
|
2024-06-17 22:36:23 +02:00
|
|
|
|
2024-06-02 22:37:55 +02:00
|
|
|
def is_adminuser():
|
|
|
|
if not current_user.is_authenticated:
|
|
|
|
return False
|
|
|
|
user = User.query.filter_by(email=current_user.email).first()
|
|
|
|
return user.admin
|