[1/6] allura git commit: [#8128] show 2FA+HTTP checkout message when needed
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 BrondsemaAuthored: Thu Sep 22 16:43:43 2016 -0400 Committer: Dave Brondsema 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=""/> +{% if not c.user.is_anonymous() and c.user.get_pref('multifactor') and h.has_access(c.app, 'write') %} + +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") + +{% endif %} {% endif %} {% endmacro %}
allura git commit: [#8128] show 2FA+HTTP checkout message when needed
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 BrondsemaAuthored: Thu Sep 22 16:43:43 2016 -0400 Committer: Dave Brondsema 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=""/> +{% if not c.user.is_anonymous() and c.user.get_pref('multifactor') and h.has_access(c.app, 'write') %} + +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") + +{% endif %} {% endif %} {% endmacro %}