details:   /erp/devel/pi/rev/444c11bbdbff
changeset: 12213:444c11bbdbff
user:      David Alsasua <david.alsasua <at> openbravo.com>
date:      Wed May 18 10:55:22 2011 +0200
summary:   Fixes issue 17132: Posting with non-admin roles failed

diffstat:

 src/org/openbravo/erpCommon/ad_forms/AcctServer.java |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 4f0bf76a1b92 -r 444c11bbdbff 
src/org/openbravo/erpCommon/ad_forms/AcctServer.java
--- a/src/org/openbravo/erpCommon/ad_forms/AcctServer.java      Wed May 18 
10:47:49 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer.java      Wed May 18 
10:55:22 2011 +0200
@@ -656,6 +656,8 @@
     m_fact = new Fact[m_as.length];
     // AcctSchema Table check
     boolean isTableActive = false;
+    try {
+      OBContext.setAdminMode(true);
     for (AcctSchema as : m_as) {
       AcctSchemaTable table = null;
       OBCriteria<AcctSchemaTable> criteria = 
OBDao.getFilteredCriteria(AcctSchemaTable.class,
@@ -669,6 +671,9 @@
         break;
       }
     }
+    } finally {
+      OBContext.restorePreviousMode();
+    }
     if (!isTableActive) {
       setMessageResult(conn, vars, STATUS_TableDisabled, "Warning");
       return false;

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to