Login- how to make unique and safe - chose Option 1 (sysconfig parameter to use email as login)

Description

Users - same user on multiple tenants

Login will display email and password. Second box will show tenants where there is also a role. Invert it to select Tenant first, then show available roles. If there is just one tenant, then hide Tenant selection. If there is just one role, then hide role selection. We know that some users may have the same email and password but work for separate companies- this should still work, they just get choice of tenants on second login dialog. We also know that same user may be a customer for another tenant (web store contact) but these will not have Roles, so they will be filtered out.

Environment

None

Attachments

7

Activity

Show:

Carlos Ruiz April 23, 2013 at 8:57 PM

Redhuan, the order of login window was changed from:

adempiere:

  • Role

  • Client

  • Organization

idempiere:

  • Client

  • Role

  • Org

I think in order to iDempierize the Mobile Android UI is better to change the order and logic of login to match this new way.

Regards,

Carlos Ruiz

RedhuanO April 23, 2013 at 7:17 AM

Below changes breaks login from /mobile (testing as a plugin). Please review if need to be reverted.
- public KeyNamePair[] getOrgs (KeyNamePair client)

+ public KeyNamePair[] getOrgs (KeyNamePair rol)

{

- if (client == null)

- throw new IllegalArgumentException("Client missing");

- if (Env.getContext(m_ctx,"#AD_Role_ID").length() == 0) // could be number 0

- throw new UnsupportedOperationException("Missing Context #AD_Role_ID");

+ if (rol == null)

+ throw new IllegalArgumentException("Rol missing");

+ if (Env.getContext(m_ctx,"#AD_Client_ID").length() == 0) // could be number 0

+ throw new UnsupportedOperationException("Missing Context #AD_Client_ID");

RedhuanO April 23, 2013 at 7:16 AM
Edited

I attached Login-getOrgs.patch to revert the mentioned breakage below. Mobile Android UI login cannot work as it should use the Client ID not the Role ID.

Carlos Ruiz October 20, 2012 at 10:42 PM

https://bitbucket.org/idempiere/idempiere/changeset/6fa35bc
prevent NPE when filling the client box with garbage

Fixed

Details

Assignee

Reporter

Priority

Created August 7, 2012 at 8:35 PM
Updated July 5, 2014 at 2:50 PM
Resolved August 14, 2012 at 5:02 AM