diff --git a/cps/admin.py b/cps/admin.py index 38a0d59e..9b7402c5 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -172,6 +172,11 @@ def view_configuration(): # Mature Content configuration if "config_mature_content_tags" in to_save: content.config_mature_content_tags = to_save["config_mature_content_tags"].strip() + if "Show_mature_content" in to_save: + content.config_default_show = content.config_default_show + ub.MATURE_CONTENT + + if "config_authors_max" in to_save: + content.config_authors_max = int(to_save["config_authors_max"]) # Default user configuration content.config_default_role = 0 @@ -196,9 +201,6 @@ def view_configuration(): val += int(key[5:]) content.config_default_show = val - - if "Show_mature_content" in to_save: - content.config_default_show = content.config_default_show + ub.MATURE_CONTENT ub.session.commit() flash(_(u"Calibre-Web configuration updated"), category="success") config.loadSettings() diff --git a/cps/oauth_bb.py b/cps/oauth_bb.py index 75a30bbf..fb4ba60c 100644 --- a/cps/oauth_bb.py +++ b/cps/oauth_bb.py @@ -223,11 +223,12 @@ if ub.oauth_support: except Exception as e: app.logger.exception(e) ub.session.rollback() - if config.config_public_reg: - return redirect(url_for('web.register')) - else: - flash(_(u"Public registration is not enabled"), category="error") - redirect(url_for(redirect_url)) + return redirect(url_for('web.login')) + #if config.config_public_reg: + # return redirect(url_for('web.register')) + #else: + # flash(_(u"Public registration is not enabled"), category="error") + # return redirect(url_for(redirect_url)) except NoResultFound: return redirect(url_for(redirect_url)) @@ -306,7 +307,7 @@ if ub.oauth_support: return unlink_oauth(github_blueprint.name) - @oauth.route('/google') + @oauth.route('/login/google') @google_oauth_required def google_login(): if not google.authorized: diff --git a/cps/templates/config_view_edit.html b/cps/templates/config_view_edit.html index c92f888a..ff71aa8a 100644 --- a/cps/templates/config_view_edit.html +++ b/cps/templates/config_view_edit.html @@ -29,7 +29,7 @@