Login Preferences are created on System tenant
Description
Environment
Attachments
Activity
Reopening as there is a NPE when filling the client field with a wrong value.
Test case:
login at https://test.idempiere.org/webui/ with the "Select Role" checked
Fill the tenant field with any wrong value and click "Tab"
Error: "Cannot invoke "org.zkoss.zul.Comboitem.getValue()" because "lstItemClient" is null"
The last commit bbb5aa8562 solved the problem for users with access to multiple clients, but left a problem for users with access to a single client.
got error when setup fresh idempiere and login as System
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "oldValue" is null
at org.adempiere.webui.util.UserPreference.savePreference(UserPreference.java:128)
i think it must check if the oldValue is null or not.
i attached the patch
The implementation here is causing a problem with SuperUser:
Test case:
I login with Spanish language (user SuperUser)
I click Change Role
the language is filled with English - must respect the language that Iām logged in originally
Reopening as having now cross-tenant exception when the same user is created in two tenants.
The login preferences are being created on System tenant - creating a somehow cross-tenant issue.
f.e. if you want to export JUST the system tenant, it will end with preferences from users that donāt exist.
Also, if you want a tenant admin to maintain user preferences from users, is not possible. For example GardenAdmin trying to maintain the login preference for GardenUser.
This is closely related to IDEMPIERE-5843