You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/06/13 20:34:50 UTC
[08/17] git commit: [#7436] ticket:601 Add more sections and config
options
[#7436] ticket:601 Add more sections and config options
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/88ef1d42
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/88ef1d42
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/88ef1d42
Branch: refs/heads/db/7406
Commit: 88ef1d4234374d34c5133289b2f0381e821a7ed7
Parents: ae84a85
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Jun 12 12:26:48 2014 +0300
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jun 12 19:38:42 2014 +0000
----------------------------------------------------------------------
Allura/allura/templates/user_prefs.html | 59 ++++++++++++++++------------
Allura/development.ini | 3 ++
2 files changed, 37 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/88ef1d42/Allura/allura/templates/user_prefs.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/user_prefs.html b/Allura/allura/templates/user_prefs.html
index 83db662..61b4a87 100644
--- a/Allura/allura/templates/user_prefs.html
+++ b/Allura/allura/templates/user_prefs.html
@@ -103,33 +103,42 @@
{% endif %} {# allow_edit_prefs #}
{% endblock edit_prefs_form %}
- {% if c.password_change_form %}
- <fieldset>
- <legend>Change Password</legend>
- {{ c.password_change_form.display() }}
- </fieldset>
- {% endif %}
- {% if c.upload_key_form %}
- <fieldset>
- <legend>Upload ssh public key</legend>
- {{ c.upload_key_form.display() }}
- </fieldset>
- {% endif %}
+ {% block password_change_form %}
+ {% if h.asbool(tg.config.get('auth.allow_password_change', True)) %}
+ <fieldset>
+ <legend>Change Password</legend>
+ {{ c.password_change_form.display() }}
+ </fieldset>
+ {% endif %}
+ {% endblock %}
- <fieldset>
- <legend>User Messages</legend>
- <form method="POST" action="user_message">
- <div class="grid-10">
- <input type="checkbox" id="allow_user_messages" name="allow_user_messages" {% if not c.user.get_pref('disable_user_messages') %} checked {% endif %}>
- <label for="allow_user_messages">Allow another user to send me direct email messages</label>
- </div>
- <div class="grid-2">
- <input class="submit" type="submit" value="Save">
- </div>
- {{ lib.csrf_token() }}
- </form>
- </fieldset>
+ {% block upload_key_form %}
+ {% if h.asbool(tg.config.get('auth.allow_upload_ssh_key', False)) %}
+ <fieldset>
+ <legend>Upload ssh public key</legend>
+ {{ c.upload_key_form.display() }}
+ </fieldset>
+ {% endif %}
+ {% endblock %}
+
+ {% block user_messages_form %}
+ {% if h.asbool(tg.config.get('auth.allow_user_messages_config', True)) %}
+ <fieldset>
+ <legend>User Messages</legend>
+ <form method="POST" action="user_message">
+ <div class="grid-10">
+ <input type="checkbox" id="allow_user_messages" name="allow_user_messages" {% if not c.user.get_pref('disable_user_messages') %} checked {% endif %}>
+ <label for="allow_user_messages">Allow another user to send me direct email messages</label>
+ </div>
+ <div class="grid-2">
+ <input class="submit" type="submit" value="Save">
+ </div>
+ {{ lib.csrf_token() }}
+ </form>
+ </fieldset>
+ {% endif %}
+ {% endblock %}
</div>
{% endblock %}
http://git-wip-us.apache.org/repos/asf/allura/blob/88ef1d42/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index f088bf9..8cc60c1 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -88,6 +88,9 @@ auth.ldap.password.salt_len = 16
auth.allow_user_to_disable_account = true
auth.allow_edit_prefs = true
+auth.allow_password_change = true
+auth.allow_upload_ssh_key = false
+auth.allow_user_messages_config = true
# In seconds
auth.recovery_hash_expiry_period = 600