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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035187
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2017-02-07 14:522017-03-15 20:19
ReporterngarciaView Statuspublic 
Assigned Tocaristu 
PriorityimmediateResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revision37570fc76755
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2016-04-18
Regression introduced in release3.0PR16Q3
Regression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/82f27ac1b1497b3a82646b140ab1b6e048f2b766 [^]
Triggers an Emergency PackNo
Summary

0035187: Cannot attach a document to an invoice if the role does not have access to ADTab entity and there is a module In Development

DescriptionCannot attach a document to an invoice if the role does not have access to ADTab entity and there is a module In Development

In upload function of AttachImplementationManager class the getTab function of the ApplicationDictionaryCachedStructures class is executed:

Tab tab = adcs.getTab(strTab);

There, if there exists a module In Development it is trying to return the Tab class:

    if (!useCache()) {
      // not using cache, initialize just current tab and go
      return OBDal.getInstance().get(Tab.class, tabId);
    }
Steps To ReproduceAs system admin role:
   Set a module In Development
Restart Tomcat

As group admin role:
   Create a new manual role
   Add access to F&B EspaƱa Region Norte organization
   Add editable access to Sales Invoice window
   Assign it to Openbravo user
   Log out and log in
   Change to the previously created role
   Go to Sales Invoice window, select a record and print it
   Select the option to attach it (Yes)
   Check the following error message is shown:

      "Entity ADTab is not readable by the user ..."

   The log shows:

org.openbravo.base.exception.OBSecurityException: Entity ADTab is not readable by the user 100
    at org.openbravo.dal.security.EntityAccessChecker.checkReadable(EntityAccessChecker.java:464)
    at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:654)
    at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:641)
    at org.openbravo.dal.service.OBDal.get(OBDal.java:337)
    at org.openbravo.client.application.window.ApplicationDictionaryCachedStructures.getTab(ApplicationDictionaryCachedStructures.java:124)
    at org.openbravo.client.application.window.ApplicationDictionaryCachedStructures$Proxy$_$$_WeldClientProxy.getTab(ApplicationDictionaryCachedStructures$Proxy$_$$_WeldClientProxy.java)
    at org.openbravo.client.application.attachment.AttachImplementationManager.upload(AttachImplementationManager.java:119)
    at org.openbravo.erpCommon.utility.reporting.ReportManager.createAttachmentForReport(ReportManager.java:198)
    at org.openbravo.erpCommon.utility.reporting.ReportManager.createAttachmentForReport(ReportManager.java:165)
    at org.openbravo.erpCommon.utility.reporting.printing.PrintController.buildReport(PrintController.java:625)
    at org.openbravo.erpCommon.utility.reporting.printing.PrintController.post(PrintController.java:254)
    at org.openbravo.erpCommon.utility.reporting.printing.PrintInvoices.doPost(PrintInvoices.java:54)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00351973.0PR17Q1 closedcaristu Cannot attach a document to an invoice if the role does not have access to ADTab entity and there is a module In Development 
depends on backport 00351983.0PR16Q4.3 closedcaristu Cannot attach a document to an invoice if the role does not have access to ADTab entity and there is a module In Development 
depends on backport 00351993.0PR16Q3.6 closedcaristu Cannot attach a document to an invoice if the role does not have access to ADTab entity and there is a module In Development 
caused by feature request 0029771 closednaiaramartinez different attachment method infrastructure 

-  Notes
(0094145)
hgbot (developer)
2017-02-08 14:04

Repository: erp/devel/pi
Changeset: 37570fc76755c06a43fc1e724771660d734ba329
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Feb 08 14:00:56 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/37570fc76755c06a43fc1e724771660d734ba329 [^]

fixes bug 35187: Can't attach using manual role having modules in indevelopment

It was not possible to attach a document with a role that hasn't got access to ADTab entity having modules in indevelopment. This was happening because when there are modules in indevelopemnt status, the getTab method of the ADCS class does not store the tab information in cache and uses DAL to retrieve the tab every time it is being called.

Under this circumstances, the getTab method in AttachImplementationManager must be invoked in admin mode to ensure that the role can generate the attachment even when not having access to the ADTab entity.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
---
(0094152)
hgbot (developer)
2017-02-08 16:25

Repository: erp/devel/pi
Changeset: c6e7d84809eb167826afeebe8e1f438a9561392a
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Feb 08 16:24:17 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c6e7d84809eb167826afeebe8e1f438a9561392a [^]

related to issue 35187: updated copyright year

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java
---
(0094177)
caristu (developer)
2017-02-09 12:46
edited on: 2017-02-09 12:47

Added test cases into TestLink:

https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10551 [^]

https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10552 [^]

(0094192)
alostale (manager)
2017-02-10 07:28

code reviewed + tested
(0095171)
hudsonbot (developer)
2017-03-15 20:19

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/54e102bef53e [^]
Maturity status: Test
(0095172)
hudsonbot (developer)
2017-03-15 20:19

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/54e102bef53e [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-02-07 14:52 ngarcia New Issue
2017-02-07 14:52 ngarcia Assigned To => platform
2017-02-07 14:52 ngarcia Modules => Core
2017-02-07 14:52 ngarcia Triggers an Emergency Pack => No
2017-02-07 14:52 ngarcia Issue Monitored: networkb
2017-02-07 19:35 caristu Assigned To platform => caristu
2017-02-07 19:35 caristu Status new => acknowledged
2017-02-08 13:16 caristu Regression level => Production - QA Approved
2017-02-08 13:16 caristu Regression date => 2016-04-18
2017-02-08 13:16 caristu Regression introduced in release => 3.0PR16Q3
2017-02-08 13:16 caristu Regression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/82f27ac1b1497b3a82646b140ab1b6e048f2b766 [^]
2017-02-08 13:16 caristu Relationship added caused by 0029771
2017-02-08 13:17 caristu Status acknowledged => scheduled
2017-02-08 14:04 hgbot Checkin
2017-02-08 14:04 hgbot Note Added: 0094145
2017-02-08 14:04 hgbot Status scheduled => resolved
2017-02-08 14:04 hgbot Resolution open => fixed
2017-02-08 14:04 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/37570fc76755c06a43fc1e724771660d734ba329 [^]
2017-02-08 16:25 hgbot Checkin
2017-02-08 16:25 hgbot Note Added: 0094152
2017-02-09 12:46 caristu Note Added: 0094177
2017-02-09 12:47 caristu Note Edited: 0094177 View Revisions
2017-02-10 07:28 alostale Review Assigned To => alostale
2017-02-10 07:28 alostale Note Added: 0094192
2017-02-10 07:28 alostale Status resolved => closed
2017-02-10 07:28 alostale Fixed in Version => 3.0PR17Q2
2017-03-15 20:19 hudsonbot Checkin
2017-03-15 20:19 hudsonbot Note Added: 0095171
2017-03-15 20:19 hudsonbot Checkin
2017-03-15 20:19 hudsonbot Note Added: 0095172


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker