Author: taher
Date: Sat Sep 30 15:36:32 2017 New Revision: 1810216 URL: http://svn.apache.org/viewvc?rev=1810216&view=rev Log: Fixed: Login after multitenant bug (OFBIZ-9278) Investigation of the code base revealed that the implementation of the createTenant gradle task was faulty where the master tenants database (ofbiztenant) is not loaded with any tenant information. This is because the flag for readers is missing (readers=tenant). This commit fixes the issue, however, another bug is revealed after the fix in which trying to login to the first tenant, then logout then login to the second tenant fails with an error message of user not found. This is most likely a bug related to session management or cookies on the client side because logging in from two different browsers succeeds without any issues. Thanks: Guillaume Fortin for reporting and Vivek Mishra for testing and feedback Modified: ofbiz/ofbiz-framework/trunk/README.md ofbiz/ofbiz-framework/trunk/build.gradle Modified: ofbiz/ofbiz-framework/trunk/README.md URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/README.md?rev=1810216&r1=1810215&r2=1810216&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/README.md (original) +++ ofbiz/ofbiz-framework/trunk/README.md Sat Sep 30 15:36:32 2017 @@ -280,6 +280,10 @@ OFBiz contains the following data reader - __ext__: External General Data (custom) - __ext-test__: External Test Data (custom) - __ext-demo__: External Demo Data (custom) +- __tenant__: Data to load into the master tenants database "ofbiztenant". This + data is required to identify where a tenant's database is located. For more + information you can review the relevant + [tenant documentation](https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support) Available options for the --load-data server command are the following: Modified: ofbiz/ofbiz-framework/trunk/build.gradle URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1810216&r1=1810215&r2=1810216&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/build.gradle (original) +++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Sep 30 15:36:32 2017 @@ -438,14 +438,15 @@ task createTenant(group: ofbizServer, de } // Load the tenants master database - createOfbizCommandTask('loadTenantOnDefaultDelegator', - ['--load-data', 'file=/runtime/tmp/tmpFilteredTenantData.xml'], + createOfbizCommandTask('loadTenantOnMasterTenantDb', + ['--load-data', 'file=/runtime/tmp/tmpFilteredTenantData.xml', + '--load-data', 'readers=tenant'], jvmArguments, false) - loadTenantOnDefaultDelegator.dependsOn(generateDatabaseTemplateFile, generateAdminUserTemplateFile) + loadTenantOnMasterTenantDb.dependsOn(generateDatabaseTemplateFile, generateAdminUserTemplateFile) // Load the actual tenant data createOfbizCommandTask('loadTenantData', [], jvmArguments, false) - loadTenantData.dependsOn(loadTenantOnDefaultDelegator) + loadTenantData.dependsOn(loadTenantOnMasterTenantDb) // Load the tenant admin user account createOfbizCommandTask('loadTenantAdminUserLogin', [], jvmArguments, false) |
Free forum by Nabble | Edit this page |