Add login_required decorator
This commit is contained in:
@@ -7,7 +7,7 @@ import sqlite3
|
||||
import os
|
||||
from shutil import copy
|
||||
from socket import gethostname
|
||||
from tools.utils import email_disp, append_to_log, gen_token, valid_passwd
|
||||
from tools.utils import email_disp, append_to_log, gen_token, valid_passwd, login_required
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ BACKUP_TIME = app.config['BACKUP_TIME']
|
||||
|
||||
|
||||
@mymailbox.route('/mymailbox/alias', methods=['GET', 'POST'] )
|
||||
@login_required
|
||||
def myalias():
|
||||
hostname=gethostname()
|
||||
UTILISATEUR='%s' % escape(session['username'])
|
||||
@@ -94,6 +95,7 @@ def myalias():
|
||||
|
||||
|
||||
@mymailbox.route('/mymailbox/rmalias/<aliasrm>')
|
||||
@login_required
|
||||
def remove_alias(aliasrm):
|
||||
if MAIL_SERVER:
|
||||
UTILISATEUR='%s' % escape(session['username'])
|
||||
|
||||
Reference in New Issue
Block a user