Author: shane.bryzak(a)jboss.com
Date: 2008-10-14 08:36:51 -0400 (Tue, 14 Oct 2008)
New Revision: 9298
Modified:
trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
Log:
minor change to security restrictions
Modified: trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2008-10-14 12:10:54 UTC
(rev 9297)
+++ trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2008-10-14 12:36:51 UTC
(rev 9298)
@@ -200,7 +200,13 @@
{
Restrict restrict = (Restrict) annotation;
if (restrictions == null) restrictions = new HashSet<String>();
- restrictions.add(Strings.isEmpty(restrict.value()) ?
"#{identity.loggedIn}" : restrict.value());
+
+ if ( Strings.isEmpty(restrict.value()) )
+ {
+ throw new IllegalStateException("@Restrict on a Wicket component
must specify an expression");
+ }
+
+ restrictions.add(restrict.value());
}
if (annotation.annotationType().isAnnotationPresent(RoleCheck.class))