forked from crunk/distribusi-verse
9 lines
244 B
Python
9 lines
244 B
Python
|
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
|