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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032627
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2016-04-08 12:222016-06-17 19:36
ReporteralostaleView Statuspublic 
Assigned Tocaristu 
PrioritynormalResolutionfixedFixed in Version3.0PR16Q3
StatusclosedFix in branchFixed in SCM revisionf7c2d3f60821
ProjectionnoneETAnoneTarget Version
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

0032627: 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 ]
related to defect 0032626 closedcaristu cannot propagate privileges if a template role has been used in a session 
related to feature request 00309313.0PR16Q1 closedcaristu Add ability to inherit role permissions 
depends on backport 00326303.0PR16Q2 closedcaristu template role cannot be used as session role 
depends on backport 00326313.0PR16Q1.1 closedcaristu template role cannot be used as session role 

-  Notes
(0085544)
hgbot (developer)
2016-04-11 08:45

Repository: erp/devel/pi
Changeset: f7c2d3f60821875696fc7f5ce1150da6d2e633da
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Apr 08 14:58:03 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f7c2d3f60821875696fc7f5ce1150da6d2e633da [^]

fixes issue 32627: 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
---
(0085644)
alostale (manager)
2016-04-14 17:13

Unnecessary casting:
  return (Role) OBDal.getInstance().get(Role.class, roleId);
(0085645)
hgbot (developer)
2016-04-14 17:31

Repository: erp/devel/pi
Changeset: e27f72c3ca89d9344752d89db9b0aaa18c788ead
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Apr 14 17:28:52 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e27f72c3ca89d9344752d89db9b0aaa18c788ead [^]

related to issue 32627: removed unnecessary casting

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

code reviewed + tested
(0087436)
hudsonbot (developer)
2016-06-17 19:36

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/0dc7be081b1c [^]
Maturity status: Test
(0087449)
hudsonbot (developer)
2016-06-17 19:36

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

- Issue History
Date Modified Username Field Change
2016-04-08 12:22 alostale New Issue
2016-04-08 12:22 alostale Assigned To => platform
2016-04-08 12:22 alostale Modules => Core
2016-04-08 12:22 alostale Triggers an Emergency Pack => No
2016-04-08 12:22 alostale Relationship added related to 0032626
2016-04-08 12:23 alostale Steps to Reproduce Updated View Revisions
2016-04-08 12:23 alostale Relationship added related to 0030931
2016-04-08 12:24 alostale Assigned To platform => caristu
2016-04-08 12:25 alostale Status new => scheduled
2016-04-11 08:45 hgbot Checkin
2016-04-11 08:45 hgbot Note Added: 0085544
2016-04-11 08:45 hgbot Status scheduled => resolved
2016-04-11 08:45 hgbot Resolution open => fixed
2016-04-11 08:45 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f7c2d3f60821875696fc7f5ce1150da6d2e633da [^]
2016-04-11 08:46 caristu Review Assigned To => alostale
2016-04-14 17:13 alostale Note Added: 0085644
2016-04-14 17:13 alostale Status resolved => new
2016-04-14 17:13 alostale Resolution fixed => open
2016-04-14 17:31 hgbot Checkin
2016-04-14 17:31 hgbot Note Added: 0085645
2016-04-14 17:43 caristu Status new => scheduled
2016-04-14 17:46 caristu Status scheduled => resolved
2016-04-14 17:46 caristu Resolution open => fixed
2016-04-18 08:26 alostale Note Added: 0085683
2016-04-18 08:26 alostale Status resolved => closed
2016-04-18 08:26 alostale Fixed in Version => 3.0PR16Q3
2016-06-17 19:36 hudsonbot Checkin
2016-06-17 19:36 hudsonbot Note Added: 0087436
2016-06-17 19:36 hudsonbot Checkin
2016-06-17 19:36 hudsonbot Note Added: 0087449


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker