Index: topia-security/src/java/org/codelutin/topia/security/listener/EntityVetoable.java diff -u topia-security/src/java/org/codelutin/topia/security/listener/EntityVetoable.java:1.4 topia-security/src/java/org/codelutin/topia/security/listener/EntityVetoable.java:1.5 --- topia-security/src/java/org/codelutin/topia/security/listener/EntityVetoable.java:1.4 Fri Oct 27 09:50:34 2006 +++ topia-security/src/java/org/codelutin/topia/security/listener/EntityVetoable.java Fri Oct 27 17:00:24 2006 @@ -24,9 +24,9 @@ * Created: 10 févr. 2006 * * @author Arnaud Thimel -* @version $Revision: 1.4 $ +* @version $Revision: 1.5 $ * -* Mise a jour: $Date: 2006/10/27 09:50:34 $ +* Mise a jour: $Date: 2006/10/27 17:00:24 $ * par : $Author: ruchaud $ */ @@ -103,26 +103,23 @@ TopiaEntity entity = event.getEntity(); String topiaId = entity.getTopiaId(); - if(!(entity instanceof NoEntityVetoableRead)) { - if (log.isDebugEnabled()) { - log.debug("[Security] load entity : " + topiaId); - } + if (log.isDebugEnabled()) { + log.debug("[Security] load entity : " + topiaId); + } - /* Vérification dans le cache */ - boolean contain = securityManager.containEntitiesLoadingCache(topiaId); - - if(!contain) { - try { - securityManager.checkPermission(topiaId, LOAD); - - } catch (SecurityException te) { - authorized = false; - } + /* Vérification dans le cache */ + boolean contain = securityManager.containEntitiesLoadingCache(topiaId); + + if(!contain) { + try { + securityManager.checkPermission(topiaId, LOAD); - /* Mise en cache */ - securityManager.putEntitiesLoadingCache(topiaId, authorized); + } catch (SecurityException te) { + authorized = false; } + /* Mise en cache */ + securityManager.putEntitiesLoadingCache(topiaId, authorized); } } Index: topia-security/src/java/org/codelutin/topia/security/listener/PropertyVetoable.java diff -u topia-security/src/java/org/codelutin/topia/security/listener/PropertyVetoable.java:1.2 topia-security/src/java/org/codelutin/topia/security/listener/PropertyVetoable.java:1.3 --- topia-security/src/java/org/codelutin/topia/security/listener/PropertyVetoable.java:1.2 Fri Oct 27 09:50:34 2006 +++ topia-security/src/java/org/codelutin/topia/security/listener/PropertyVetoable.java Fri Oct 27 17:00:24 2006 @@ -24,9 +24,9 @@ * Created: 10 févr. 2006 * * @author Arnaud Thimel -* @version $Revision: 1.2 $ +* @version $Revision: 1.3 $ * -* Mise a jour: $Date: 2006/10/27 09:50:34 $ +* Mise a jour: $Date: 2006/10/27 17:00:24 $ * par : $Author: ruchaud $ */ @@ -63,7 +63,7 @@ private void putVetoables(TopiaEntityEvent event) { TopiaEntity entity = event.getEntity(); - if (!(entity instanceof NoEntityVetoableRead)) { + if (!(entity instanceof NoSecurityLoad)) { entity.addVetoableListener(read); } entity.addVetoableChangeListener(write); Index: topia-security/src/java/org/codelutin/topia/security/listener/NoSecurityLoad.java diff -u /dev/null topia-security/src/java/org/codelutin/topia/security/listener/NoSecurityLoad.java:1.1 --- /dev/null Fri Oct 27 17:00:29 2006 +++ topia-security/src/java/org/codelutin/topia/security/listener/NoSecurityLoad.java Fri Oct 27 17:00:24 2006 @@ -0,0 +1,29 @@ +/* *##% +* Copyright (C) 2002, 2003, 2004, 2005 Code Lutin, +* Cédric Pineau, Benjamin Poussin, +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*##%*/ + +package org.codelutin.topia.security.listener; + +/** + * Interface permettant à préciser que l'entité n'est pas soumis aux autorisations + * de chargement sur les entités. + * @author ruchaud + */ +public interface NoSecurityLoad { +}