From f14e0a7d03aadc3d8aa5fe1290b61446b5ab9eed Mon Sep 17 00:00:00 2001 From: "ironcero@cloudbees.com" Date: Fri, 19 Feb 2021 22:30:28 +0100 Subject: [PATCH] [JENKINS-64341] Code review fixes --- .../checkPasswordRequested.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/resources/org/jenkinsci/plugins/authorizeproject/strategy/SpecificUsersAuthorizationStrategy/checkPasswordRequested.js b/src/main/resources/org/jenkinsci/plugins/authorizeproject/strategy/SpecificUsersAuthorizationStrategy/checkPasswordRequested.js index 441b187..55b368a 100644 --- a/src/main/resources/org/jenkinsci/plugins/authorizeproject/strategy/SpecificUsersAuthorizationStrategy/checkPasswordRequested.js +++ b/src/main/resources/org/jenkinsci/plugins/authorizeproject/strategy/SpecificUsersAuthorizationStrategy/checkPasswordRequested.js @@ -46,6 +46,13 @@ Behaviour.specify(".specific-user-authorization", "checkPasswordRequired", 0, fu var useridField = findFormItem(e, "userid", findChild(e)); var passwordField = findFormItem(e, "password", findChild(e)); var passwordFieldBlock = findAncestor(passwordField, "TR"); + /* + [JENKINS-64341] - In Jenkins version greater than 2.263.4 + the table tags for fields (in forms) were replaced by div tags. + Since the changes were applied the 'findAncestor(passwordField, "TR")' + method returns null. It is necessary to use the method + 'findAncestorClass(passwordField, "tr")' instead of. + */ if (passwordFieldBlock == null) { passwordFieldBlock = findAncestorClass(passwordField, "tr"); }