@@ -48,12 +48,13 @@ from rhodecode.model.forms import UserFo
ApplicationUiSettingsForm, ApplicationVisualisationForm
from rhodecode.model.scm import ScmModel
from rhodecode.model.user import UserModel
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__)
class SettingsController(BaseController):
"""REST Controller styled on the Atom Publishing Protocol"""
@@ -468,15 +469,17 @@ class SettingsController(BaseController)
for each in ret:
k = each.ui_key
v = each.ui_value
if k == '/':
k = 'root_path'
if k == 'push_ssl':
v = str2bool(v)
if k.find('.') != -1:
k = k.replace('.', '_')
if each.ui_section in ['hooks', 'extensions']:
v = each.ui_active
settings[each.ui_section + '_' + k] = v
return settings
@@ -275,12 +275,16 @@ class RhodeCodeUi(Base, BaseModel):
new_ui.ui_active = True
new_ui.ui_key = key
new_ui.ui_value = val
Session().add(new_ui)
def __repr__(self):
return '<DB:%s[%s:%s]>' % (self.__class__.__name__, self.ui_key,
self.ui_value)
class User(Base, BaseModel):
__tablename__ = 'users'
__table_args__ = (
UniqueConstraint('username'), UniqueConstraint('email'),
Index('u_username_idx', 'username'),
@@ -183,13 +183,13 @@
<div class="field">
<div class="label label-checkbox">
<label>${_('Web')}:</label>
</div>
<div class="checkboxes">
<div class="checkbox">
${h.checkbox('web_push_ssl','true')}
${h.checkbox('web_push_ssl', 'True')}
<label for="web_push_ssl">${_('require ssl for vcs operations')}</label>
<span class="help-block">${_('RhodeCode will require SSL for pushing or pulling. If SSL is missing it will return HTTP Error 406: Not Acceptable')}</span>
Status change: