Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0053447 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2023-09-13 10:40 | 2023-09-13 10:40 | |||||||
Reporter | ablasco | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
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 | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
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 |
Copyright © 2000 - 2009 MantisBT Group |