pull/906/head
Moravčík, Marian 5 years ago
parent 3ed36eeb8a
commit 43a60eca07

@ -1,4 +1,5 @@
# coding=utf-8
import hashlib
import os
from simpleconfigparser import simpleconfigparser
@ -157,6 +158,9 @@ def save_settings(settings_items):
elif value == 'false':
value = 'False'
if key == 'settings-auth-password':
value = hashlib.md5(value.encode('utf-8')).hexdigest()
if settings_keys[0] == 'settings':
settings[settings_keys[1]][settings_keys[2]] = str(value)

@ -158,6 +158,7 @@ def post_get(name, default=''):
@app.route("/logout/")
@login_required
def logout():
test = settings.auth.type
if settings.auth.type == 'basic':
return abort(401)
elif settings.auth.type == 'form':
@ -562,43 +563,43 @@ def movie(no):
return render_template('movie.html', id=str(no))
@app.route('/historyseries/')
@app.route('/history/series/')
@login_required
def historyseries():
return render_template('historyseries.html')
@app.route('/historymovies/')
@app.route('/history/movies/')
@login_required
def historymovies():
return render_template('historymovies.html')
@app.route('/wantedseries/')
@app.route('/wanted/series/')
@login_required
def wantedseries():
return render_template('wantedseries.html')
@app.route('/wantedmovies/')
@app.route('/wanted/movies/')
@login_required
def wantedmovies():
return render_template('wantedmovies.html')
@app.route('/settingsgeneral/')
@app.route('/settings/general/')
@login_required
def settingsgeneral():
return render_template('settingsgeneral.html')
@app.route('/settingssonarr/')
@app.route('/settings/sonarr/')
@login_required
def settingssonarr():
return render_template('settingssonarr.html')
@app.route('/settingsradarr/')
@app.route('/settings/radarr/')
@login_required
def settingsradarr():
return render_template('settingsradarr.html')
@ -613,31 +614,31 @@ def check_update():
return '', 200
@app.route('/systemtasks')
@app.route('/system/tasks')
@login_required
def systemtasks():
return render_template('systemtasks.html')
@app.route('/systemlogs')
@app.route('/system/logs')
@login_required
def systemlogs():
return render_template('systemlogs.html')
@app.route('/systemproviders')
@app.route('/system/providers')
@login_required
def systemproviders():
return render_template('systemproviders.html')
@app.route('/systemstatus')
@app.route('/system/status')
@login_required
def systemstatus():
return render_template('systemstatus.html')
@app.route('/systemreleases')
@app.route('/system/releases')
@login_required
def systemreleases():
return render_template('systemreleases.html')

@ -73,13 +73,13 @@
<b>Authentication</b>
</div>
<div class="form-group col-sm-4">
<select class="selectpicker" id="settings-auth-type" name="settings-auth-type">
<select class="form-control selectpicker" id="settings-auth-type" name="settings-auth-type">
<option value="None">None</option>
<option value="Basic">Basic</option>
<option value="Form">Form</option>
<option value="basic">Basic</option>
<option value="form">Form</option>
</select>
<label for="settings-auth-type">Require Username and Password to access Bazarr</label><br>
<label class="restart">Requires restart to take effect</label>
{# <label class="restart">Requires restart to take effect</label>#}
</div>
</div>
<div id="authentication_div">
@ -122,7 +122,7 @@
<b>Type</b>
</div>
<div class="form-group col-sm-4">
<select class="selectpicker" id="settings-proxy-type" name="settings-proxy-type">
<select class="form-control selectpicker" id="settings-proxy-type" name="settings-proxy-type">
<option value="None">None</option>
<option value="http">HTTP(S)</option>
<option value="socks4">Socks4</option>
@ -186,7 +186,7 @@
<b>Page Size</b>
</div>
<div class="form-group col-sm-4">
<select class="selectpicker" id="settings-general-page_size" name="settings-general-page_size">
<select class="form-control selectpicker" id="settings-general-page_size" name="settings-general-page_size">
<option value="-1">Unlimited</option>
<option value="25">25</option>
<option value="50">50</option>
@ -237,7 +237,7 @@
<b>Branch</b>
</div>
<div class="form-group col-sm-4">
<select class="selectpicker" id="settings-general-branch" name="settings-general-branch">
<select class="form-control selectpicker" id="settings-general-branch" name="settings-general-branch">
<option value="master">master</option>
<option value="development">development</option>
</select>

@ -68,7 +68,7 @@
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Details</span></h4><br>
<h4 class="modal-title">Details</h4><br>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

Loading…
Cancel
Save