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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032231
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2016-02-15 13:262016-03-17 10:56
ReportermaiteView Statuspublic 
Assigned Tocaristu 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q2
StatusclosedFix in branchFixed in SCM revisionc400203ec54f
ProjectionnoneETAnoneTarget Version3.0PR16Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032231: "OBSERDS_RoleHasNoFieldAccess" error thrown with specific role definition and Total Gross Amount with no decimals

DescriptionIf you define a role with NO access to an specific tab but access to an specific field in Sales Order window, when editing the allowed field error "Saving failed. F&B International Group Admin does not have access to the field Total Gross Amount" is obtained only in case Total Gross Amount has not decimals
Steps To Reproduce0. Access Sales Order window and create header for any org and bp
1. Access Role window, select "F&B International Group Admin" and go to Window Access tab. Access "Sales Order" window and access "Tab Access" to set "Header - Sales Order" and NOT editable tab. Access to "field access" tab and set "Description - Header - Sales Order" as "Editable field"
2. Logout/login
3. Access previous order and add any line setting price of 100 and qty=1 (to ensure that Total Gross Amount has no decimals). Save line
4. Access Order header, edit description field and save. Error "Saving failed. F&B International Group Admin does not have access to the field Total Gross Amount" is raised

NOTE: if Total Gross Amount is a decimal number then error is not raised
Proposed SolutionError is raised by DefaultDataSourceService.java:261, when following code is executed:

String newValue = getValue(data, key);
String oldValue = getValue(oldData, key);
if (oldValue == null && newValue != null || oldValue != null
&& !oldValue.equals(newValue)) {
throw new RuntimeException(KernelUtils.getInstance().getI18N(
"OBSERDS_RoleHasNoFieldAccess",
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0032292 closedcaristu "OBSERDS_RoleHasNoFieldAccess" error thrown with specific role definition in Field tab 

-  Notes
(0084230)
hgbot (developer)
2016-02-16 10:17

Repository: erp/devel/pi
Changeset: c400203ec54f07b313cdfc3efc538bccef4f7716
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Feb 16 10:15:42 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c400203ec54f07b313cdfc3efc538bccef4f7716 [^]

fixes issue 32231: wrong number comparison when checking field access of a role

When checking the access of a numeric field, if it is an integer, the client sends the value without decimal places. This value is compared with the current value stored in the database which already stores the value with decimals. So, the comparison of the string values determines that they are different as for example we are comparing '100' with '100.00'.

To solve the problem, for this type of fields now the numeric value is compared instead of using its string representation.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java
---
(0084349)
alostale (manager)
2016-02-19 11:00

Reopening current fix throws NPE if values are null.

Steps to reproduce it:
 1. Create a System Admin manual role
 2. Give read only access to Windows Tabs And Fields > Field
 3. Give edit access to Description field
 4. Using that role
 5. Open any existing Window
 6. Edit description for any field where Record Sort No. is empty and save
    -> ERROR
         NPE: can be seen in the log
         In UI the field continues as in Edit, save is not performed
(0084367)
hgbot (developer)
2016-02-19 13:10

Repository: erp/devel/pi
Changeset: f58e58d7e308b6824b5cfa65bd33188d7a806e1a
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Feb 19 13:09:01 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f58e58d7e308b6824b5cfa65bd33188d7a806e1a [^]

related to issue 32231: check if values are null

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java
---
(0084539)
alostale (manager)
2016-02-26 09:03
edited on: 2016-02-26 09:04

Code reviewed

Tested with specified steps to reproduce as well as with limited role explained in note above.

(0085142)
hudsonbot (developer)
2016-03-17 10:56

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test
(0085157)
hudsonbot (developer)
2016-03-17 10:56

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-02-15 13:26 maite New Issue
2016-02-15 13:26 maite Assigned To => platform
2016-02-15 13:26 maite Modules => Core
2016-02-15 13:26 maite Resolution time => 1458514800
2016-02-15 13:26 maite Triggers an Emergency Pack => No
2016-02-15 13:26 maite Issue Monitored: networkb
2016-02-16 10:07 caristu Assigned To platform => caristu
2016-02-16 10:07 caristu Status new => scheduled
2016-02-16 10:17 hgbot Checkin
2016-02-16 10:17 hgbot Note Added: 0084230
2016-02-16 10:17 hgbot Status scheduled => resolved
2016-02-16 10:17 hgbot Resolution open => fixed
2016-02-16 10:17 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c400203ec54f07b313cdfc3efc538bccef4f7716 [^]
2016-02-16 10:19 caristu Review Assigned To => alostale
2016-02-16 10:19 caristu Issue Monitored: alostale
2016-02-19 11:00 alostale Note Added: 0084349
2016-02-19 11:00 alostale Status resolved => new
2016-02-19 11:00 alostale Resolution fixed => open
2016-02-19 13:10 hgbot Checkin
2016-02-19 13:10 hgbot Note Added: 0084367
2016-02-19 13:16 caristu Relationship added related to 0032292
2016-02-19 13:24 caristu Status new => scheduled
2016-02-19 13:24 caristu Status scheduled => resolved
2016-02-19 13:24 caristu Resolution open => fixed
2016-02-26 09:03 alostale Note Added: 0084539
2016-02-26 09:03 alostale Status resolved => closed
2016-02-26 09:03 alostale Fixed in Version => 3.0PR16Q2
2016-02-26 09:03 alostale Note Edited: 0084539 View Revisions
2016-02-26 09:04 alostale Note Edited: 0084539 View Revisions
2016-03-17 10:56 hudsonbot Checkin
2016-03-17 10:56 hudsonbot Note Added: 0085142
2016-03-17 10:56 hudsonbot Checkin
2016-03-17 10:56 hudsonbot Note Added: 0085157


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker