Wrong query check user record access when use multiple "AD_Record_Access"

Description

If your role has multiple "AD_Record_Access", in some cases, the query for verification the availability of access is not created correctly.
Before create this query, you must sort all available"AD_Record_Access" by AD_Table_ID.

UPDATE:
I tested in iDempiere 5.1 localhost.
Test case:
1) Create user demo\demo
2) Create master role (Access 1, Access 2) (please take look a screen_1)
3) Create role demo.
3.1) Add role window access to "Warehouse Locators"
3.2) Add this role included role: Access 1, Access 2
4) Login at user demo\demo
5) Open window Warehouse Locators
6) Create debug breakpoint MRole[2077]

7) Click on button "Refresh" and debug variable "retSQL".

My test result:
1) Failed query:

2) After fix:

3) New error.
If you take a look on "AND M_Locator_ID IN (50002,50007,50001,50007)".
Is error. I created AD_RecordAccess for table M_Locator only for 50001, 50007 (please take look a screen_1).
Fix for this error (file patch is updated) MRole[2052-2057]:

After fix:

This error can prevent a user from accessing records. We could not understand the reason for the error for a long time.

Best regards
Palich.ru Development Team

Environment

None

Activity

Show:
Carlos Ruiz
July 23, 2018, 7:21 PM

Thanks ,

Can you please explain a failing case to test this patch?

Regards,

Carlos Ruiz

Carlos Ruiz
January 26, 2019, 12:20 PM

Closing per lack of feedback - please feel free to reopen if is still valid.

Assignee

Unassigned

Reporter

Никита Полковников

Labels

Tested By

None

Affects versions

Priority

Major
Configure