Initialization of authorization service from the code is now working.
[photos] / src / main / java / org / wamblee / photos / wicket / HomePage.java
index ccb667034e39cf7bd512dfaada84396f83b280c0..26331e6fec69d83494ca993d8b1aafd61a8c3ba5 100644 (file)
@@ -24,6 +24,7 @@ import org.apache.wicket.markup.html.basic.Label;
 import org.wamblee.photos.model.Album;
 import org.wamblee.photos.model.PhotoEntry;
 import org.wamblee.photos.model.plumbing.AllPhotos;
+import org.wamblee.photos.model.plumbing.AuthorizedPhotos;
 import org.wamblee.security.authentication.User;
 import org.wamblee.security.authentication.UserAdministration;
 
@@ -44,15 +45,14 @@ public class HomePage extends BasePage {
     @AllPhotos
     private Album album;
 
-    // @Inject
-    // @AuthorizedPhotos
-    // private Album authorized;
+    @Inject
+    @AuthorizedPhotos
+    private Album authorized;
 
     /**
      * Constructor that is invoked when page is invoked without a session.
-     * 
-     * @param parameters
-     *            Page parameters
+     *
+     * @param parameters Page parameters
      */
     public HomePage(final PageParameters parameters) throws Exception {
         super();
@@ -69,17 +69,13 @@ public class HomePage extends BasePage {
         System.out.println("Entries: " + album.size());
         for (int i = 0; i < album.size(); i++) {
             PhotoEntry entry = album.getEntry(i);
-            System.out.println("Entry " + i + " " + entry.getId() + " " +
-                entry.getPath());
+            System.out.println("Entry " + i + " " + entry.getId() + " " + entry.getPath());
         }
 
-        /*
         System.out.println("Authorized Entries: " + authorized.size());
         for (int i = 0; i < authorized.size(); i++) {
             PhotoEntry entry = authorized.getEntry(i);
-            System.out.println("Entry " + i + " " + entry.getId() + " " +
-                entry.getPath());
+            System.out.println("Entry " + i + " " + entry.getId() + " " + entry.getPath());
         }
-        */
     }
 }