Index: topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java diff -u topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java:1.22 topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java:1.23 --- topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java:1.22 Mon Jul 3 10:08:31 2006 +++ topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java Fri Jul 21 00:52:22 2006 @@ -23,9 +23,9 @@ * * @author poussin * - * @version $Revision: 1.22 $ + * @version $Revision: 1.23 $ * - * Last update: $Date: 2006/07/03 10:08:31 $ by : $Author: thimel $ + * Last update: $Date: 2006/07/21 00:52:22 $ by : $Author: thimel $ */ package org.codelutin.topia.framework; @@ -1240,7 +1240,7 @@ loadAuthorised &= context.fireVetoableLoad(event.getPersister().getMappedClass( EntityMode.POJO), event.getId()); if (!loadAuthorised) { - throw new SecurityException("User is not authorised to load this entity"); + throw new SecurityException("User is not authorised to load this entity : " + event.getId()); } } } @@ -1364,11 +1364,18 @@ * @see org.codelutin.topia.framework.TopiaContextImplementor#getUserManager() */ public TopiaUserManager getUserManager() { + if (getParentContext() != null) { + return getParentContext().getUserManager(); + } if (userManager == null) { //L'appel à isSecurityEnabled va forcer l'initialisation du securityType if (isSecurityEnabled()) { if ("topia".equalsIgnoreCase(securityType)) { - userManager = new TopiaHibernateUserManager(this); + try { + userManager = new TopiaHibernateUserManager(this); + } catch (TopiaException te) { + log.error("Recuperation du userManager impossible", te); + } } else if ("ldap".equalsIgnoreCase(securityType)) { // userManager = new TopiaLDAPUserManager(this); } else { @@ -1385,11 +1392,18 @@ * @see org.codelutin.topia.framework.TopiaContextImplementor#getPermissionManager() */ public TopiaPermissionManager getPermissionManager() { + if (getParentContext() != null) { + return getParentContext().getPermissionManager(); + } if (permissionManager == null) { //L'appel à isSecurityEnabled va forcer l'initialisation du securityType if (isSecurityEnabled()) { if ("topia".equalsIgnoreCase(securityType)) { - permissionManager = new TopiaHibernatePermissionManager(this); + try { + permissionManager = new TopiaHibernatePermissionManager(this); + } catch (TopiaException te) { + log.error("Recuperation du permissionManager impossible", te); + } } else if ("ldap".equalsIgnoreCase(securityType)) { // userManager = new TopiaLDAPUserManager(this); } else {