Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019570Openbravo ERPA. Platformpublic2012-01-26 15:592012-01-31 08:31
mtaal 
mtaal 
normalcriticalhave not tried
closedfixed 
5
 
3.0MP83.0MP8 
Core
No
0019570: Saving form layout fails because entity access checker throws error
When saving a form layout the flush/commit is done at the end of the commit, at that point the admin mode is not enabled anymore and a entity not writable exception is thrown.

Login in to Ob@ob and try to change a form layout and save it, a server side exception is shown, the stacktrace shows that the flush is done at the end of the request.

org.openbravo.base.exception.OBSecurityException: Entity OBUIAPP_UIPersonalization is not writable by this user
    org.openbravo.dal.security.EntityAccessChecker.checkWritable(EntityAccessChecker.java:317)
    org.openbravo.dal.security.SecurityChecker.checkWriteAccess(SecurityChecker.java:176)
    org.openbravo.dal.core.OBInterceptor.doEvent(OBInterceptor.java:315)
    org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:179)
    org.hibernate.event.def.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:372)
    org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349)
    org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287)
    org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155)
    org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
    org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
    org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
    org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
    org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
    org.openbravo.dal.core.SessionHandler.commitAndClose(SessionHandler.java:211)
    org.openbravo.dal.core.DalThreadHandler.doFinal(DalThreadHandler.java:51)
    org.openbravo.dal.core.DalRequestFilter$1.doFinal(DalRequestFilter.java:99)
    org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:65)
    org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
a dal flush should be done before the admin mode is restored inside the PersonalizationActionHandler
No tags attached.
Issue History
2012-01-26 15:59mtaalNew Issue
2012-01-26 15:59mtaalAssigned To => mtaal
2012-01-26 15:59mtaalModules => Core
2012-01-26 16:00jpcalventeIssue Monitored: jpcalvente
2012-01-26 16:03hgbotCheckin
2012-01-26 16:03hgbotNote Added: 0044613
2012-01-26 16:03hgbotStatusnew => resolved
2012-01-26 16:03hgbotResolutionopen => fixed
2012-01-26 16:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4f51e3816793441237b6c0683426dcdb5bd97ca7 [^]
2012-01-28 04:10hudsonbotCheckin
2012-01-28 04:10hudsonbotNote Added: 0044670
2012-01-31 08:31alostaleNote Added: 0044719
2012-01-31 08:31alostaleStatusresolved => closed
2012-01-31 08:31alostaleFixed in Version => 3.0MP8

Notes
(0044613)
hgbot   
2012-01-26 16:03   
Repository: erp/devel/pi
Changeset: 4f51e3816793441237b6c0683426dcdb5bd97ca7
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jan 26 16:02:37 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4f51e3816793441237b6c0683426dcdb5bd97ca7 [^]

Fixes issue 19570 Saving form layout fails because entity access checker throws error
Added flush statement before changing back to non admin mode

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationActionHandler.java
---
(0044670)
hudsonbot   
2012-01-28 04:10   
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/8e16ef45b30c [^]

Maturity status: Test
(0044719)
alostale   
2012-01-31 08:31   
tested on pi@5a4d3a30f629