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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032630
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajorhave not tried2016-04-08 12:222016-04-18 08:27
ReporteralostaleView Statuspublic 
Assigned Tocaristu 
PrioritynormalResolutionfixedFixed in Version3.0PR16Q2
StatusclosedFix in branchFixed in SCM revision4270b2af7fe3
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

0032630: template role cannot be used as session role

DescriptionWhen a role marked as template is used to create a session, errors are logged when trying to save some preferences. This makes not possible to save ie. recent navigation items.
Steps To Reproduce1. Create a new role:
  * name: bt
  * level: client+org
  * manual: yes
  * template: yes
    * org access: EspaƱa Norte
    * user: assignment: Openbravo
    * window access: Sales Order
2. Login with Openbravo user using that role
3. Open Sales Order window
  ERROR in log: 4388732 [http-8080-6] ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: ADRole.aDRoleInheritanceInheritFromList, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: ADRole.aDRoleInheritanceInheritFromList, no session or session was closed
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383)
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375)
    at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:368)
    at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111)
    at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272)
    at org.openbravo.role.inheritance.RoleInheritanceManager.propagateNewAccess(RoleInheritanceManager.java:380)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
    at org.openbravo.role.inheritance.RoleInheritanceManager$Proxy$_$$_WeldClientProxy.propagateNewAccess(RoleInheritanceManager$Proxy$_$$_WeldClientProxy.java)
    at org.openbravo.role.inheritance.InheritedAccessEnabledEventHandler.doAction(InheritedAccessEnabledEventHandler.java:107)
    at org.openbravo.role.inheritance.InheritedAccessEnabledEventHandler.onSave(InheritedAccessEnabledEventHandler.java:69)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0032627 closedcaristu template role cannot be used as session role 

-  Notes
(0085647)
hgbot (developer)
2016-04-14 17:46

Repository: erp/backports/3.0PR16Q2
Changeset: 4270b2af7fe3a9e9690e09cbca27ebf9336bf285
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Apr 14 17:45:28 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q2/rev/4270b2af7fe3a9e9690e09cbca27ebf9336bf285 [^]

fixes issue 32630: template role cannot be used as session role
Now the injector used for preferences returns the complete Role object and not a proxy, in order to prevent possible LazyInitializationException when using a template role as session role.
This was happening because some preferences are created at system level when a session role is making use of the UI. It is also verified that after fixing this issue, those preferences are not being propagated, thanks to the preference black list.

---
M src/org/openbravo/role/inheritance/access/PreferenceAccessInjector.java
---
(0085684)
alostale (manager)
2016-04-18 08:27

code reviewed + tested

- Issue History
Date Modified Username Field Change
2016-04-08 12:25 alostale Type defect => backport
2016-04-08 12:25 alostale Target Version => 3.0PR16Q2
2016-04-14 17:46 hgbot Checkin
2016-04-14 17:46 hgbot Note Added: 0085647
2016-04-14 17:46 hgbot Status scheduled => resolved
2016-04-14 17:46 hgbot Resolution open => fixed
2016-04-14 17:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q2/rev/4270b2af7fe3a9e9690e09cbca27ebf9336bf285 [^]
2016-04-18 08:27 alostale Review Assigned To => alostale
2016-04-18 08:27 alostale Note Added: 0085684
2016-04-18 08:27 alostale Status resolved => closed
2016-04-18 08:27 alostale Fixed in Version => 3.0PR16Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker