Repository: allura
Updated Branches:
  refs/heads/db/8128 6ac5a2c26 -> 9e0469d50


[#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/9e0469d5
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/9e0469d5
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/9e0469d5

Branch: refs/heads/db/8128
Commit: 9e0469d50370c32bc641075c224be355a83de1c0
Parents: 6ac5a2c
Author: Dave Brondsema <d...@brondsema.net>
Authored: Thu Sep 22 16:43:43 2016 -0400
Committer: Dave Brondsema <d...@brondsema.net>
Committed: Thu Sep 22 16:43:43 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/9e0469d5/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