[seam-commits] Seam SVN: r9298 - trunk/src/wicket/org/jboss/seam/wicket.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Oct 14 08:36:51 EDT 2008


Author: shane.bryzak at 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))




More information about the seam-commits mailing list