details: https://code.openbravo.com/erp/devel/pi/rev/e913a860b967 changeset: 28257:e913a860b967 user: Carlos Aristu <carlos.aristu <at> openbravo.com> date: Thu Jan 14 10:49:51 2016 +0100 summary: fixes issue 31867: can not move tree nodes in classic mode
When moving tree nodes using the classic mode there is a point where the process tries to recover the tree type. This information is stored in the ADTable entity which can not be accessed by non system roles. To prevent this error now the part where the tree type is recovered is executed using the DAL admin mode. diffstat: src/org/openbravo/erpCommon/utility/WindowTree.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diffs (33 lines): diff -r cac91026199d -r e913a860b967 src/org/openbravo/erpCommon/utility/WindowTree.java --- a/src/org/openbravo/erpCommon/utility/WindowTree.java Tue Dec 29 15:37:32 2015 +0530 +++ b/src/org/openbravo/erpCommon/utility/WindowTree.java Thu Jan 14 10:49:51 2016 +0100 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2013 Openbravo SLU + * All portions are Copyright (C) 2001-2016 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -456,7 +456,8 @@ } // Calculating the TreeID - { + try { + OBContext.setAdminMode(); Tab tab = OBDal.getInstance().get(Tab.class, strTabId); Table table = tab.getTable(); @@ -481,7 +482,10 @@ } } + } finally { + OBContext.restorePreviousMode(); } + // Calculating the parent if (!strTop.equals("0")) { WindowTreeData[] data = WindowTreeUtility.getTree(this, vars, TreeType, TreeID, editable, "", ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits