Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0048757Openbravo ERPA. Platformpublic2022-03-10 09:072022-03-15 14:09
kousalya_r 
jarmendariz 
highmajoralways
closedfixed 
5
 
PR22Q2 
Core
No
0048757: Not able to login when default user role deactivation
Not able to login when default role is deactivate in user roles tab of User Window.

This problem occurs because the DefaultOptionsData.getDefaultRole method does not take into account the activated check of this tab, here is the select:
The following condition should be added in the select statement 'and userRoles.isactive='Y''.

The issue has been fixed and patch is attached below.
Create a user with three roles, we will call them Role1, Role2 and Role3. Set Role1 by default to the user.
In the user roles tab (it is important that it is the tab, not the roles window) deactivate Role1 and Role2.
Try to log in, if you log in, deactivate Role 3 and activate Role 2, when trying to log in you will not be able to.

No tags attached.
? 38991_UserRole (686) 2022-03-10 09:07
https://issues.openbravo.com/file_download.php?file_id=16721&type=bug
Issue History
2022-03-10 09:07kousalya_rNew Issue
2022-03-10 09:07kousalya_rAssigned To => Triage Platform Base
2022-03-10 09:07kousalya_rFile Added: 38991_UserRole
2022-03-10 09:07kousalya_rModules => Core
2022-03-10 09:07kousalya_rTriggers an Emergency Pack => No
2022-03-11 12:24AugustoMauchAssigned ToTriage Platform Base => jarmendariz
2022-03-11 12:25AugustoMauchStatusnew => scheduled
2022-03-15 14:08hgbotNote Added: 0135731
2022-03-15 14:09hgbotResolutionopen => fixed
2022-03-15 14:09hgbotStatusscheduled => closed
2022-03-15 14:09hgbotFixed in Version => PR22Q2
2022-03-15 14:09hgbotNote Added: 0135732
2022-03-15 14:09hgbotNote Added: 0135733

Notes
(0135731)
hgbot   
2022-03-15 14:08   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/539 [^]
(0135732)
hgbot   
2022-03-15 14:09   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 71345332bad649532d0adfb7c52bc177497c1747
Author: Javier Armendáriz <javier.armendariz@openbravo.com>
Date: 15-03-2022 14:03:31
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/71345332bad649532d0adfb7c52bc177497c1747 [^]

Fixed ISSUE-48757: Adding user role active check on getDefaultRole function

This function is used to pick an active user role when the default user role
is not active, and without this check you can retrieve a role that is not
enabled in the user roles tab, causing the login process to fail.

---
M src/org/openbravo/base/secureApp/DefaultOptions_data.xsql
---
(0135733)
hgbot   
2022-03-15 14:09   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/539 [^]