Repository: allura
Updated Branches:
  refs/heads/master 7fb402233 -> 77619a1b6


[#8128] show 2FA+HTTP checkout message when needed


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/77619a1b
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/77619a1b
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/77619a1b

Branch: refs/heads/master
Commit: 77619a1b6a55ab776a4372f12b25310c61b4f37a
Parents: e529920
Author: Dave Brondsema <d...@brondsema.net>
Authored: Thu Sep 22 16:43:43 2016 -0400
Committer: Dave Brondsema <d...@brondsema.net>
Committed: Fri Sep 23 14:37:00 2016 -0400

----------------------------------------------------------------------
 Allura/allura/templates/repo/repo_master.html | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/77619a1b/Allura/allura/templates/repo/repo_master.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/repo_master.html 
b/Allura/allura/templates/repo/repo_master.html
index 1d94285..eb51f79 100644
--- a/Allura/allura/templates/repo/repo_master.html
+++ b/Allura/allura/templates/repo/repo_master.html
@@ -38,10 +38,16 @@
   $('#access_urls .btn').click(function(evt){
     evt.preventDefault();
     var parent = $(this).parents('.btn-bar');
-    $(parent).find('input').val($(this).attr('data-url'));
+    var checkout_cmd = $(this).attr('data-url');
+    $(parent).find('input').val(checkout_cmd);
     $(parent).find('span').text($(this).attr('title')+' access');
     $(this).parent().children('.btn').removeClass('active');
     $(this).addClass('active');
+    if (checkout_cmd.indexOf(' http://') !== -1 || checkout_cmd.indexOf(' 
https://') !== -1 ) {
+      $('#http-2fa-msg').show();
+    } else {
+      $('#http-2fa-msg').hide();
+    }
   });
   $('#access_urls .btn').first().click();
 
@@ -110,6 +116,12 @@
              class="selectText"
              value=""/>
     </div>
+    {% if not c.user.is_anonymous() and c.user.get_pref('multifactor') and 
h.has_access(c.app, 'write') %}
+        <div id="http-2fa-msg" class="grid-19 info" style="display: none">
+        When using HTTP access with two-factor auth, you will need to enter 
your password and current token together as
+        the password (e.g. "p4ssw0Rd123456")
+        </div>
+    {% endif %}
     <hr>
   {% endif %}
 {% endmacro %}

Reply via email to