Author: deepak
Date: Sat Apr 11 09:43:10 2015
New Revision: 1672853

URL: http://svn.apache.org/r1672853
Log:
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/trunk/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java
    
ofbiz/trunk/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java
    ofbiz/trunk/framework/common/webcommon/changePassword.ftl
    ofbiz/trunk/framework/common/webcommon/login.ftl
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
    ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl
    ofbiz/trunk/specialpurpose/myportal/widget/login.ftl

Modified: 
ofbiz/trunk/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java
 (original)
+++ 
ofbiz/trunk/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java
 Sat Apr 11 09:43:10 2015
@@ -333,7 +333,7 @@ public class SeoContextFilter extends Co
                     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/trunk/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java
 (original)
+++ 
ofbiz/trunk/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java
 Sat Apr 11 09:43:10 2015
@@ -299,7 +299,7 @@ public class UrlRegexpContextFilter exte
                     httpRequest.getSession().setAttribute("dispatcher", 
dispatcher);
                     httpRequest.getSession().setAttribute("security", 
security);
 
-                    httpRequest.setAttribute("tenantId", tenantId);
+                    httpRequest.setAttribute("userTenantId", tenantId);
                 }
 
                 // NOTE DEJ20101130: do NOT always put the delegator name in 
the user's session because the user may

Modified: ofbiz/trunk/framework/common/webcommon/changePassword.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/changePassword.ftl?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/changePassword.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/changePassword.ftl Sat Apr 11 
09:43:10 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/trunk/framework/common/webcommon/login.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/login.ftl?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/login.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/login.ftl Sat Apr 11 09:43:10 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/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java 
(original)
+++ 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java 
Sat Apr 11 09:43:10 2015
@@ -268,10 +268,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
@@ -305,7 +305,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/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java 
(original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java 
Sat Apr 11 09:43:10 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/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl (original)
+++ ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl Sat Apr 
11 09:43:10 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/trunk/specialpurpose/myportal/widget/login.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/login.ftl?rev=1672853&r1=1672852&r2=1672853&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/widget/login.ftl (original)
+++ ofbiz/trunk/specialpurpose/myportal/widget/login.ftl Sat Apr 11 09:43:10 
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>


Reply via email to