[jira] Created: (OFBIZ-3736) multi-tenant function do not work if switch from one app to another by click the menu

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-3736) multi-tenant function do not work if switch from one app to another by click the menu

Nicolas Malin (Jira)
multi-tenant function do not work if  switch from one app to another by click the menu
--------------------------------------------------------------------------------------

                 Key: OFBIZ-3736
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
             Project: OFBiz
          Issue Type: Bug
    Affects Versions: SVN trunk
         Environment: ALL
            Reporter: WeizhanGuo
             Fix For: SVN trunk


I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

WeizhanGuo updated OFBIZ-3736:
------------------------------

    Summary: multi-tenant function do not work correctly if  switch from one app to another by click the menu  (was: multi-tenant function do not work if  switch from one app to another by click the menu)

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

WeizhanGuo updated OFBIZ-3736:
------------------------------

    Attachment: MultiTenantExternalLoginKeyCheckError20100421.patch

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>         Attachments: MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913615#action_12913615 ]

David - DiSiD Technologies commented on OFBIZ-3736:
---------------------------------------------------

Release Branch 10.04 is also an affected version.

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>         Attachments: MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913915#action_12913915 ]

frank commented on OFBIZ-3736:
------------------------------

Folks I have successfuly tested this patch and merged this with my local ofbiz trunk. Let me know if you would like me to resubmit the patch or preferred contribution process thanks.

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>         Attachments: MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914026#action_12914026 ]

Jacques Le Roux commented on OFBIZ-3736:
----------------------------------------

I was ready to commit this patch after review and compilation but before I test I have a doubt on how and why is exactly used the "main database" in this case.

I'd think that there were as many databases as tenants. As I see it, the "main database" is only a placeholder besides the "ofbiztenant database" were the "tenants databases" are specified. And it's those  "tenants databases" which are really used.

Could you please explain how and why you use the "main database" ? Which data have you installed in it? Is it only for test, production?

Thanks

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>         Attachments: MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914256#action_12914256 ]

frank commented on OFBIZ-3736:
------------------------------

Hi Jacques not sure what you are referring to there but here's my setup...

I have  a main database AND a tenant(s) database setup (using the tenant demo data setup). The test I run is to login to say 'accounting' as a tentant (i.e. DEMO1). I then switch the app (i.e. i invoke through the menu) over to say the party manager (again as DEMO1). The resultant test is that the tenant delegator (DEMO1) always get used and hits the tenant database (lemme know if you are seeing things differently from the attached code?). Implicitly, the use of the tenant delegator then always use the relevant tenant database.

Wrt my setup; yep the intention is I have a master database (and this will purely be for the purposes of setting up a ecommerce registration/subscription model that enable me to register new 'tenants' and actually use the cascading ordering and invoicing modules to bill my tenants (i.e. they would be using a Saas model and therefore their usage of certain modules would be by virtue of purchasing ecommerce 'products' (i.e. accounting module, inventory module etc.) whether that is on a periodic / renewal basis or outright; so it is sort of like the controlling database for my Saas offering.  The seperate tenant databases will deffo be for used by my 'tenants' authentication/authorisation and so yep this would be going into my production setup (would be handy for other as well i would imagine?). I';ve attached my code by the way ..is this what yyu are looking at and appreciate if you can indicate the reference to the 'main' database (maybe I am missing something?)

thanks
frank





> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>         Attachments: loginworker.sample.txt, MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

frank updated OFBIZ-3736:
-------------------------

    Attachment: loginworker.sample.txt

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>         Attachments: loginworker.sample.txt, MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914692#action_12914692 ]

Jacques Le Roux commented on OFBIZ-3736:
----------------------------------------

Thanks Frank,

I understand how you use it now.

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>             Fix For: SVN trunk
>
>         Attachments: loginworker.sample.txt, MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-3736) multi-tenant function do not work correctly if switch from one app to another by click the menu

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-3736.
----------------------------------

         Assignee: Jacques Le Roux
    Fix Version/s: Release Branch 10.04
       Resolution: Fixed

Thanks Guo, David and Frank,

Guo, your patch is in trunk at r1001099, r10.04 at r1001100

> multi-tenant function do not work correctly if  switch from one app to another by click the menu
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3736
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3736
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>         Environment: ALL
>            Reporter: WeizhanGuo
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 10.04, SVN trunk
>
>         Attachments: loginworker.sample.txt, MultiTenantExternalLoginKeyCheckError20100421.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found a problem when I switch from one app to another, the multi-tenant did not work if the username and password  are the same in the main database and tenants, for example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
> I debug this problem, and there is missing to check the userlogin tenant in checkExternalLoginKey.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.