# HG changeset patch # User Marcin Kuzminski # Date 1347033194 -7200 # Node ID 9c90be87ae052c5862a5cad13aa7d2d72b45bccc # Parent c0cc8f8a71b080ecfcfa6a66fe0e593febe1e189 fixed issue #560 require push ssl checkbox wasn't shown when option was enabled diff -r c0cc8f8a71b0 -r 9c90be87ae05 rhodecode/controllers/admin/settings.py --- a/rhodecode/controllers/admin/settings.py Fri Sep 07 02:20:02 2012 +0200 +++ b/rhodecode/controllers/admin/settings.py Fri Sep 07 17:53:14 2012 +0200 @@ -51,6 +51,7 @@ from rhodecode.model.db import User from rhodecode.model.notification import EmailNotificationModel from rhodecode.model.meta import Session +from rhodecode.lib.utils2 import str2bool log = logging.getLogger(__name__) @@ -471,6 +472,9 @@ if k == '/': k = 'root_path' + if k == 'push_ssl': + v = str2bool(v) + if k.find('.') != -1: k = k.replace('.', '_') @@ -478,5 +482,4 @@ v = each.ui_active settings[each.ui_section + '_' + k] = v - return settings diff -r c0cc8f8a71b0 -r 9c90be87ae05 rhodecode/model/db.py --- a/rhodecode/model/db.py Fri Sep 07 02:20:02 2012 +0200 +++ b/rhodecode/model/db.py Fri Sep 07 17:53:14 2012 +0200 @@ -278,6 +278,10 @@ Session().add(new_ui) + def __repr__(self): + return '' % (self.__class__.__name__, self.ui_key, + self.ui_value) + class User(Base, BaseModel): __tablename__ = 'users' diff -r c0cc8f8a71b0 -r 9c90be87ae05 rhodecode/templates/admin/settings/settings.html --- a/rhodecode/templates/admin/settings/settings.html Fri Sep 07 02:20:02 2012 +0200 +++ b/rhodecode/templates/admin/settings/settings.html Fri Sep 07 17:53:14 2012 +0200 @@ -186,7 +186,7 @@
- ${h.checkbox('web_push_ssl','true')} + ${h.checkbox('web_push_ssl', 'True')}
${_('RhodeCode will require SSL for pushing or pulling. If SSL is missing it will return HTTP Error 406: Not Acceptable')}