Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0053447
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2023-09-13 10:402023-09-13 10:40
ReporterablascoView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0053447: Default Role, Org , client and WareHouse when login - code inconsistency

DescriptionIn 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- 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
Powered by Mantis Bugtracker