]> git.openstreetmap.org Git - osqa.git/commitdiff
Closing OSQA-36. Applied patch from Tom Hughes.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 8 Jul 2010 23:40:13 +0000 (23:40 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 8 Jul 2010 23:40:13 +0000 (23:40 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@509 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/skins/default/templates/auth/auth_settings.html
forum/views/auth.py

index 3e3200772aa1ffa2d90a07e14d2175291a382258..8b52019b2b24b80bce1487be226f70b277eaca68 100644 (file)
 {% ifequal view_user request.user %}
     <input type="button" class="submit" value="{% trans "Add new provider" %}" onclick="window.location='{% url user_add_external_provider %}'" />
 {% endifequal %}
+{% if allow_local_auth %}
 {% if has_password %}
     <p class="message">{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}</p>
-{% endif %}
-{% if not has_password %}
+{% else %}
     <p class="message">{% blocktrans %}You can set up a password for your account, so you can login using standard username and password!{% endblocktrans %}</p>
 {% endif %}
 <div class="aligned">
@@ -33,5 +33,6 @@
         <div class="submit-row"><input type="submit" class="submit" value="{% if has_password %}{% trans "Change password" %}{% endif %}{% if not has_password %}{% trans "Create password" %}{% endif %}" /></div>
        </form>
        </div>
+{% endif %}
 {% endblock %}
 <!-- end changepw.html -->
index 5a9f954b8cd9bdb6d63d37f0ca5e4193ea983c6f..08013f978a12eaeceb54c39151d092a390aabfdf 100644 (file)
@@ -346,6 +346,7 @@ def auth_settings(request, id):
     'form': form,
     'has_password': user_.has_usable_password(),
     'auth_keys': auth_keys_list,
+    'allow_local_auth': AUTH_PROVIDERS.get('local', None),
     }, context_instance=RequestContext(request))
 
 def remove_external_provider(request, id):