Secure UserProfileView with login_required

This commit is contained in:
Santiago L 2021-12-28 09:44:04 +01:00
parent 3af67fee01
commit 338afcc556
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import flask
from flask import Blueprint
from flask.views import View
from flask_login import login_user
from flask_login import login_required, login_user
from ereuse_devicehub.forms import LoginForm
from ereuse_devicehub.resources.user.models import User
@ -33,6 +33,7 @@ class LoginView(View):
class UserProfileView(View):
decorators = [login_required]
template_name = 'ereuse_devicehub/user_profile.html'
def dispatch_request(self):