Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0053447 | Openbravo ERP | A. Platform | public | 2023-09-13 10:40 | 2023-09-13 10:40 |
Reporter | ablasco | ||||
Assigned To | Triage Platform Base | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0053447: Default Role, Org , client and WareHouse when login - code inconsistency | ||||
Description | In Backend login, a default Role, Organization , client and WareHouse are assigned by default to the user. But in some cases, this configuration could not be correctly applied when new changes are done in development. DefaultOptionsData is generated with some database queries generated in : /openbravo/src/org/openbravo/base/secureApp/DefaultOptions_data.xsql There are two functions in order to get default info. ( e.g: defaultRole(), getDefaultRole() ) - The first one 'defaultRole()' checks if there is a 'default_ad_role_id' field related with the user in 'ad_user' table. This 'default_ad_role_id' is not verified properly with info in 'ad_user_roles' table. If we remove roles in user window, default_ad_role_id could not be inside the user_roles table and it could be inconsistent. - The second one 'getDefaultRole()' uses a hack trick with : SELECT TO_CHAR(MIN(userRoles.AD_ROLE_ID)) AS DEFAULT_AD_ROLE_ID FROM AD_USER_ROLES userRoles In this query, if different roles are assigned to the user, it chooses one of them and it provides an alias as a 'DEFAULT_AD_ROLE_ID', but it doesn`t. *This hack is used also in getDefaultWarehouse() and getDefaultSystemRole() - default_ad_role_id , default_ad_org_id, default_m_warehouse_id, default_ad_client_id in users table should be reviewed when this values changes, if any of the roles related with user are removed or modified. | ||||
Steps To Reproduce | * This process requires development check in depth | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2023-09-13 10:40 | ablasco | New Issue | |||
2023-09-13 10:40 | ablasco | Assigned To | => Triage Platform Base | ||
2023-09-13 10:40 | ablasco | Modules | => Core | ||
2023-09-13 10:40 | ablasco | Triggers an Emergency Pack | => No |
There are no notes attached to this issue. |