summaryrefslogtreecommitdiff
path: root/jimbrella/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'jimbrella/auth.py')
-rw-r--r--jimbrella/auth.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/jimbrella/auth.py b/jimbrella/auth.py
index 39d355b..0b88de2 100644
--- a/jimbrella/auth.py
+++ b/jimbrella/auth.py
@@ -2,10 +2,10 @@ from flask import Blueprint, request, session, render_template, redirect, url_fo
from werkzeug.security import generate_password_hash, check_password_hash
from .users import Users
from .exceptions import UsernameTakenError
-from .config import *
+from .config import config
bp = Blueprint("auth", __name__, url_prefix="/")
-users = Users(DATABASE_PATH)
+users = Users(config.get("general", "db_path"))
def show_error(action, message):
@@ -39,7 +39,7 @@ def auth(action):
if not check_password_hash(user["password"], password):
return show_error("login", "Incorrect password. Sorry.")
elif action == "register":
- if not ACCEPT_NEW_USERS:
+ if not config.getboolean("general", "accept_new_users"):
return show_error("register", "Sorry, but user registrations are closed.")
try:
users.register(username, generate_password_hash(password), "en-US")