Author: deepak Date: Sat Apr 11 09:51:06 2015 New Revision: 1672854 URL: http://svn.apache.org/r1672854 Log: Applied fix from trunk r#1672853 =========================================================== Applied patch from jira issue OFBIZ-6222 - Change the field name 'tenantId' to 'userTenantId' from login page and ContextFilter.
Thanks Arun Patidar for reporting the issue and providing the patch. Modified: ofbiz/branches/release14.12/ (props changed) ofbiz/branches/release14.12/framework/common/webcommon/changePassword.ftl ofbiz/branches/release14.12/framework/common/webcommon/login.ftl ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java ofbiz/branches/release14.12/specialpurpose/hhfacility/webapp/hhfacility/login.ftl ofbiz/branches/release14.12/specialpurpose/myportal/widget/login.ftl Propchange: ofbiz/branches/release14.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Apr 11 09:51:06 2015 @@ -8,4 +8,4 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/trunk:1649072,1649083-1649084,1649086,1649090,1649096,1649230,1649238-1649239,1649248,1649272,1649275,1649280-1649281,1649283,1649285-1649286,1649291,1649329,1649331,1649384,1649393,1649666,1649742,1650240,1650348,1650357,1650583,1650642,1650678,1650821,1650882,1650887,1650938,1651593,1652312,1652361,1652638,1652641,1652672,1652688,1652706,1652725,1652731,1652739,1652852,1653248,1653296,1653456,1653597,1653614,1654175,1654273,1654509,1654670,1654672-1654673,1654683-1654684,1654824,1655046,1655668,1655979,1656014,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1659965,1660031,1660053,1660389,1660444,1660579,1661303,1661328,1661760,1661778,1661853,1661862,1661873,1661940,1661951,1661977,1662119-1662120,1662361,1662500,1662812,1662919,1663202,1663912,1663979,1664602,1664604,1664696,1665154,1665162,1665535,1666404,1666511,1666633,1666836,1666939,1666949,1666958,1667055,1667253,1667483,1667492,1667774,1668207, 1668214,1668236,1668246,1668258,1668263,1668265,1668270,1668277,1668314,1668657,1669317,1669588,1672427,1672430,1672846 +/ofbiz/trunk:1649072,1649083-1649084,1649086,1649090,1649096,1649230,1649238-1649239,1649248,1649272,1649275,1649280-1649281,1649283,1649285-1649286,1649291,1649329,1649331,1649384,1649393,1649666,1649742,1650240,1650348,1650357,1650583,1650642,1650678,1650821,1650882,1650887,1650938,1651593,1652312,1652361,1652638,1652641,1652672,1652688,1652706,1652725,1652731,1652739,1652852,1653248,1653296,1653456,1653597,1653614,1654175,1654273,1654509,1654670,1654672-1654673,1654683-1654684,1654824,1655046,1655668,1655979,1656014,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1659965,1660031,1660053,1660389,1660444,1660579,1661303,1661328,1661760,1661778,1661853,1661862,1661873,1661940,1661951,1661977,1662119-1662120,1662361,1662500,1662812,1662919,1663202,1663912,1663979,1664602,1664604,1664696,1665154,1665162,1665535,1666404,1666511,1666633,1666836,1666939,1666949,1666958,1667055,1667253,1667483,1667492,1667774,1668207, 1668214,1668236,1668246,1668258,1668263,1668265,1668270,1668277,1668314,1668657,1669317,1669588,1672427,1672430,1672846,1672853 Modified: ofbiz/branches/release14.12/framework/common/webcommon/changePassword.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/common/webcommon/changePassword.ftl?rev=1672854&r1=1672853&r2=1672854&view=diff ============================================================================== --- ofbiz/branches/release14.12/framework/common/webcommon/changePassword.ftl (original) +++ ofbiz/branches/release14.12/framework/common/webcommon/changePassword.ftl Sat Apr 11 09:51:06 2015 @@ -18,7 +18,7 @@ under the License. --> <#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))> -<#assign tenantId = requestParameters.tenantId!> +<#assign tenantId = requestParameters.userTenantId!> <center> <div class="screenlet login-screenlet"> @@ -29,7 +29,7 @@ under the License. <form method="post" action="<@ofbizUrl>login</@ofbizUrl>" name="loginform"> <input type="hidden" name="requirePasswordChange" value="Y"/> <input type="hidden" name="USERNAME" value="${username}"/> - <input type="hidden" name="tenantId" value="${tenantId!}"/> + <input type="hidden" name="userTenantId" value="${tenantId!}"/> <table cellspacing="0"> <tr> <td class="label">${uiLabelMap.CommonUsername}</td> Modified: ofbiz/branches/release14.12/framework/common/webcommon/login.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/common/webcommon/login.ftl?rev=1672854&r1=1672853&r2=1672854&view=diff ============================================================================== --- ofbiz/branches/release14.12/framework/common/webcommon/login.ftl (original) +++ ofbiz/branches/release14.12/framework/common/webcommon/login.ftl Sat Apr 11 09:51:06 2015 @@ -43,13 +43,13 @@ under the License. <td><input type="password" name="PASSWORD" value="" size="20"/></td> </tr> <#if ("Y" == useMultitenant) > - <#if !requestAttributes.tenantId??> + <#if !requestAttributes.userTenantId??> <tr> <td class="label">${uiLabelMap.CommonTenantId}</td> - <td><input type="text" name="tenantId" value="${parameters.tenantId!}" size="20"/></td> + <td><input type="text" name="userTenantId" value="${parameters.userTenantId!}" size="20"/></td> </tr> <#else> - <input type="hidden" name="tenantId" value="${requestAttributes.tenantId!}"/> + <input type="hidden" name="userTenantId" value="${requestAttributes.userTenantId!}"/> </#if> </#if> <tr> Modified: ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1672854&r1=1672853&r2=1672854&view=diff ============================================================================== --- ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original) +++ ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Sat Apr 11 09:51:06 2015 @@ -270,10 +270,10 @@ public class ContextFilter implements Fi } if(UtilValidate.isEmpty(tenantId)) { - tenantId = (String) httpRequest.getAttribute("tenantId"); + tenantId = (String) httpRequest.getAttribute("userTenantId"); } if(UtilValidate.isEmpty(tenantId)) { - tenantId = (String) httpRequest.getParameter("tenantId"); + tenantId = (String) httpRequest.getParameter("userTenantId"); } if (UtilValidate.isNotEmpty(tenantId)) { // if the request path is a root mount then redirect to the initial path @@ -307,7 +307,7 @@ public class ContextFilter implements Fi request.setAttribute("dispatcher", dispatcher); request.setAttribute("security", security); - request.setAttribute("tenantId", tenantId); + request.setAttribute("userTenantId", tenantId); } // NOTE DEJ20101130: do NOT always put the delegator name in the user's session because the user may Modified: ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1672854&r1=1672853&r2=1672854&view=diff ============================================================================== --- ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original) +++ ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Sat Apr 11 09:51:06 2015 @@ -399,9 +399,9 @@ public class LoginWorker { ServletContext servletContext = session.getServletContext(); // if a tenantId was passed in, see if the userLoginId is associated with that tenantId (can use any delegator for this, entity is not tenant-specific) - String tenantId = request.getParameter("tenantId"); + String tenantId = request.getParameter("userTenantId"); if (UtilValidate.isEmpty(tenantId)) { - tenantId = (String) request.getAttribute("tenantId"); + tenantId = (String) request.getAttribute("userTenantId"); } if (UtilValidate.isNotEmpty(tenantId)) { // see if we need to activate a tenant delegator, only do if the current delegatorName has a hash symbol in it, and if the passed in tenantId doesn't match the one in the delegatorName Modified: ofbiz/branches/release14.12/specialpurpose/hhfacility/webapp/hhfacility/login.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/specialpurpose/hhfacility/webapp/hhfacility/login.ftl?rev=1672854&r1=1672853&r2=1672854&view=diff ============================================================================== --- ofbiz/branches/release14.12/specialpurpose/hhfacility/webapp/hhfacility/login.ftl (original) +++ ofbiz/branches/release14.12/specialpurpose/hhfacility/webapp/hhfacility/login.ftl Sat Apr 11 09:51:06 2015 @@ -36,7 +36,7 @@ under the License. <#if ("Y" == useMultitenant)> <div data-role="fieldcontainer"> <label for="tenantId">${uiLabelMap.CommonTenantId}</label> - <input type="text" id="tenantId" name="tenantId" value="${parameters.tenantId!}" size="20"/> + <input type="text" id="tenantId" name="userTenantId" value="${parameters.userTenantId!}" size="20"/> </div> </#if> <input type="submit" value="${uiLabelMap.CommonLogin}" class="loginButton" /> Modified: ofbiz/branches/release14.12/specialpurpose/myportal/widget/login.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/specialpurpose/myportal/widget/login.ftl?rev=1672854&r1=1672853&r2=1672854&view=diff ============================================================================== --- ofbiz/branches/release14.12/specialpurpose/myportal/widget/login.ftl (original) +++ ofbiz/branches/release14.12/specialpurpose/myportal/widget/login.ftl Sat Apr 11 09:51:06 2015 @@ -43,13 +43,13 @@ under the License. <td><input type="password" name="PASSWORD" value="" size="20"/></td> </tr> <#if ("Y" == useMultitenant) > - <#if !requestAttributes.tenantId??> + <#if !requestAttributes.userTenantId??> <tr> <td class="label">${uiLabelMap.CommonTenantId}</td> - <td><input type="text" name="tenantId" value="${parameters.tenantId!}" size="20"/></td> + <td><input type="text" name="userTenantId" value="${parameters.userTenantId!}" size="20"/></td> </tr> <#else> - <input type="hidden" name="tenantId" value="${requestAttributes.tenantId!}"/> + <input type="hidden" name="userTenantId" value="${requestAttributes.userTenantId!}"/> </#if> </#if> <tr>