Login Preferences are created on System tenant

Description

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

Environment

None

Attachments

2

Activity

Carlos Ruiz
February 6, 2024 at 6:45 PM

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"

Carlos Ruiz
January 14, 2024 at 7:20 PM

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.

zuhri utama
December 15, 2023 at 1:35 AM
(edited)

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

 

Carlos Ruiz
December 13, 2023 at 6:00 PM

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

Carlos Ruiz
November 18, 2023 at 12:49 PM

Reopening as having now cross-tenant exception when the same user is created in two tenants.

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created October 19, 2023 at 1:09 PM
Updated April 1, 2024 at 10:03 AM
Resolved February 7, 2024 at 5:12 PM