]> git.openstreetmap.org Git - osqa.git/commitdiff
If you're a superuser viweing a user auth settings, don't present the option to add...
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 14 May 2010 15:29:12 +0000 (15:29 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 14 May 2010 15:29:12 +0000 (15:29 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@275 0cfe37f9-358a-4d5e-be75-b63607b5c754

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

index 051fb6baf17c4a1c37981b5343f79b6e3f2f6ee6..e19a10cc1c7d3e1eee100825185d2114595c0feb 100644 (file)
@@ -16,7 +16,9 @@
 {% if not auth_keys %}
     <p class="message">{% blocktrans %}You currently have no external authentication provider associated with your account.{% endblocktrans %}</p>
 {% endif %}
-<input type="button" class="submit" value="{% trans "Add new provider" %}" onclick="window.location='{% url user_add_external_provider %}'" />
+{% ifequal user request.user %}
+    <input type="button" class="submit" value="{% trans "Add new provider" %}" onclick="window.location='{% url user_add_external_provider %}'" />
+{% endifequal %}
 {% if has_password %}
     <p class="message">{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}</p>
 {% endif %}
index 62218e8197afe010410ab875fba90b8996d3f828..23059e2f7a11fda1f919047d5d732225bc6d6e94 100644 (file)
@@ -304,6 +304,7 @@ def auth_settings(request, id):
         })
 
     return render_to_response('auth/auth_settings.html', {
+        'user': user_,
         'form': form,
         'has_password': user_.has_usable_password(),
         'auth_keys': auth_keys_list,