Revision: 686
http://openutils.svn.sourceforge.net/openutils/?rev=686&view=rev
Author: fcarone
Date: 2008-02-22 08:13:02 -0800 (Fri, 22 Feb 2008)
Log Message:
-----------
Abstain access if no rules have been found
Modified Paths:
--------------
trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/SecurityRuleAfterInvocationHandler.java
Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/SecurityRuleAfterInvocationHandler.java
===================================================================
--- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/SecurityRuleAfterInvocationHandler.java 2008-02-21 21:04:03 UTC (rev 685)
+++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/SecurityRuleAfterInvocationHandler.java 2008-02-22 16:13:02 UTC (rev 686)
@@ -1,5 +1,17 @@
/*
- * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package it.openutils.hibernate.security.filter;
@@ -48,12 +60,9 @@
List<Object> objectArrayList = Arrays.asList(objectArray);
CollectionUtils.filter(objectArrayList, predicate);
}
- else
+ else if (!predicate.evaluate(returnedObject))
{
- if (!predicate.evaluate(returnedObject))
- {
- throw new AccessDeniedException("Access denied");
- }
+ throw new AccessDeniedException("Access denied");
}
return returnedObject;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|