directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject [1/2] directory-fortress-commander git commit: FC-79 - add common utils to web component
Date Wed, 11 Mar 2015 06:06:49 GMT
Repository: directory-fortress-commander
Updated Branches:
  refs/heads/master c5edeaecb -> 8fb94a07f


http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
index 546be37..1c9042e 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PermDetailPanel.java
@@ -40,7 +40,7 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
 import org.apache.directory.fortress.web.SelectModelEvent;
@@ -89,7 +89,7 @@ public class PermDetailPanel extends FormComponentPanel
     {
         super( id );
         this.isAdmin = isAdmin;
-        this.adminMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.adminMgr.setAdmin( SecUtils.getSession( this ) );
         this.editForm = new PermDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<Permission>(
             new Permission() ) );
         this.display = display;

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
index 257a648..eb45839 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PermListPanel.java
@@ -22,7 +22,6 @@ package org.apache.directory.fortress.web.panel;
 
 
 import com.inmethod.grid.IGridColumn;
-import com.inmethod.grid.SizeUnit;
 import com.inmethod.grid.column.PropertyColumn;
 import com.inmethod.grid.treegrid.TreeGrid;
 import org.apache.log4j.Logger;
@@ -38,7 +37,7 @@ import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.PermListModel;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
@@ -53,7 +52,6 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
 
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -86,7 +84,7 @@ public class PermListPanel extends FormComponentPanel
 
         this.isAdmin = isAdmin;
         PermListModel permListModel = new PermListModel( new Permission( "", "" ),
-            isAdmin, GlobalUtils.getRbacSession( this ) );
+            isAdmin, SecUtils.getSession( this ) );
         setDefaultModel( permListModel );
         List<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>> columns
=
             new ArrayList<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>>();
@@ -205,7 +203,7 @@ public class PermListPanel extends FormComponentPanel
                 }
 
                 Permission srchPerm = new Permission( permObject, permOperation );
-                setDefaultModel( new PermListModel( srchPerm, isAdmin, GlobalUtils.getRbacSession(
this ) ) );
+                setDefaultModel( new PermListModel( srchPerm, isAdmin, SecUtils.getSession(
this ) ) );
                 treeModel.reload();
                 rootNode.removeAllChildren();
                 List<Permission> perms = ( List<Permission> ) getDefaultModelObject();
@@ -372,7 +370,7 @@ public class PermListPanel extends FormComponentPanel
 
                 case SEARCH:
                     setDefaultModel( new PermListModel( ( Permission ) modelEvent.getEntity(),
isAdmin,
-                        GlobalUtils.getRbacSession( this ) ) );
+                        SecUtils.getSession( this ) ) );
                     treeModel.reload();
                     rootNode.removeAllChildren();
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
index b68cff9..000fd10 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PermSearchModalPanel.java
@@ -38,7 +38,7 @@ import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.LoadableDetachableModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.core.ReviewMgr;
 import org.apache.directory.fortress.core.rbac.Permission;
 
@@ -68,7 +68,7 @@ public class PermSearchModalPanel extends Panel
     public PermSearchModalPanel( String id, ModalWindow window, final boolean isAdmin )
     {
         super( id );
-        this.reviewMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.reviewMgr.setAdmin( SecUtils.getSession( this ) );
         this.isAdmin = isAdmin;
         this.window = window;
         loadPanel();

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
index bd04adf..867f330 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyDetailPanel.java
@@ -38,7 +38,7 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.wicket.validation.validator.RangeValidator;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
 import org.apache.directory.fortress.web.SelectModelEvent;
@@ -71,7 +71,7 @@ public class PwPolicyDetailPanel extends FormComponentPanel
     public PwPolicyDetailPanel( String id, Displayable display )
     {
         super( id );
-        this.pwPolicyMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.pwPolicyMgr.setAdmin( SecUtils.getSession( this ) );
         this.editForm = new PwPolicyDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<PwPolicy>(
             new PwPolicy() ) );
         this.display = display;

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyListPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyListPanel.java
index f560fe1..dd1bbeb 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicyListPanel.java
@@ -22,7 +22,6 @@ package org.apache.directory.fortress.web.panel;
 
 
 import com.inmethod.grid.IGridColumn;
-import com.inmethod.grid.SizeUnit;
 import com.inmethod.grid.column.PropertyColumn;
 import com.inmethod.grid.treegrid.TreeGrid;
 import org.apache.log4j.Logger;
@@ -37,7 +36,7 @@ import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.PwPolicyListModel;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SelectModelEvent;
@@ -49,7 +48,6 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
 
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -76,7 +74,7 @@ public class PwPolicyListPanel extends FormComponentPanel
     {
         super( id );
         PwPolicyListModel policyListModel = new PwPolicyListModel( new PwPolicy( "" ),
-            GlobalUtils.getRbacSession( this ) );
+            SecUtils.getSession( this ) );
         setDefaultModel( policyListModel );
         List<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>> columns
=
             new ArrayList<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>>();
@@ -214,7 +212,7 @@ public class PwPolicyListPanel extends FormComponentPanel
                     searchVal = "";
                 }
                 PwPolicy srchPolicy = new PwPolicy( searchVal );
-                setDefaultModel( new PwPolicyListModel( srchPolicy, GlobalUtils.getRbacSession(
this ) ) );
+                setDefaultModel( new PwPolicyListModel( srchPolicy, SecUtils.getSession(
this ) ) );
                 treeModel.reload();
                 rootNode.removeAllChildren();
                 List<PwPolicy> policies = ( List<PwPolicy> ) getDefaultModelObject();

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/PwPolicySearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicySearchModalPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicySearchModalPanel.java
index ba12612..d53233e 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/PwPolicySearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/PwPolicySearchModalPanel.java
@@ -66,7 +66,7 @@ public class PwPolicySearchModalPanel extends Panel
     {
         super( id );
         // TODO: add later:
-        //this.pwPolicyMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        //this.pwPolicyMgr.setAdmin( GlobalUtils.getSession( this ) );
         this.window = window;
         loadPanel();
     }

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/RoleDetailPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/RoleDetailPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/RoleDetailPanel.java
index 8710a70..0f000d8 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/RoleDetailPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/RoleDetailPanel.java
@@ -24,8 +24,6 @@ package org.apache.directory.fortress.web.panel;
 import com.googlecode.wicket.jquery.core.JQueryBehavior;
 import com.googlecode.wicket.kendo.ui.form.button.AjaxButton;
 import com.googlecode.wicket.kendo.ui.form.combobox.ComboBox;
-import org.apache.directory.fortress.web.panel.ConstraintPanel;
-import org.apache.directory.fortress.web.panel.Displayable;
 import org.apache.log4j.Logger;
 import org.apache.wicket.Component;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -44,7 +42,7 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
 import org.apache.directory.fortress.web.SelectModelEvent;
@@ -91,8 +89,8 @@ public class RoleDetailPanel extends Panel
     {
         super( id );
         this.isAdmin = isAdmin;
-        this.adminMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
-        this.delAdminMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.adminMgr.setAdmin( SecUtils.getSession( this ) );
+        this.delAdminMgr.setAdmin( SecUtils.getSession( this ) );
         if ( isAdmin )
         {
             this.objName = GlobalIds.DEL_ADMIN_MGR;

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/RoleListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/RoleListPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/RoleListPanel.java
index 99a87f7..71d9d0c 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/RoleListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/RoleListPanel.java
@@ -22,7 +22,6 @@ package org.apache.directory.fortress.web.panel;
 
 
 import com.inmethod.grid.IGridColumn;
-import com.inmethod.grid.SizeUnit;
 import com.inmethod.grid.column.PropertyColumn;
 import com.inmethod.grid.treegrid.TreeGrid;
 import org.apache.log4j.Logger;
@@ -36,7 +35,7 @@ import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.RoleListModel;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
@@ -50,7 +49,6 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
 
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -80,7 +78,7 @@ public class RoleListPanel<T extends Serializable> extends FormComponentPanel
     {
         super( id );
         this.isAdmin = isAdmin;
-        RoleListModel roleListModel = new RoleListModel( createRole( "" ), isAdmin, GlobalUtils.getRbacSession(
this ) );
+        RoleListModel roleListModel = new RoleListModel( createRole( "" ), isAdmin, SecUtils.getSession(
this ) );
         setDefaultModel( roleListModel );
         List<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>> columns
=
             new ArrayList<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>>();
@@ -191,7 +189,7 @@ public class RoleListPanel<T extends Serializable> extends FormComponentPanel
                 }
 
                 Role srchRole = createRole( searchVal );
-                setDefaultModel( new RoleListModel( srchRole, isAdmin, GlobalUtils.getRbacSession(
this ) ) );
+                setDefaultModel( new RoleListModel( srchRole, isAdmin, SecUtils.getSession(
this ) ) );
                 treeModel.reload();
                 rootNode.removeAllChildren();
                 List<Role> roles = ( List<Role> ) getDefaultModelObject();

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
index 6d7ef4d..045b217 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
@@ -31,7 +31,6 @@ import org.apache.log4j.Logger;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
-import org.apache.wicket.authroles.authorization.strategies.role.Roles;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.list.ListItem;
@@ -40,7 +39,7 @@ import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.LoadableDetachableModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.core.DelReviewMgr;
 import org.apache.directory.fortress.core.ReviewMgr;
 import org.apache.directory.fortress.core.rbac.Role;
@@ -80,7 +79,7 @@ public class RoleSearchModalPanel extends Panel
         super( id );
         this.window = window;
         this.isAdmin = isAdmin;
-        this.delReviewMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.delReviewMgr.setAdmin( SecUtils.getSession( this ) );
         loadPanel();
     }
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/SDDetailPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/SDDetailPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/SDDetailPanel.java
index 14a0d9f..42f5aae 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/SDDetailPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/SDDetailPanel.java
@@ -41,7 +41,7 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
 import org.apache.directory.fortress.web.SelectModelEvent;
@@ -81,7 +81,7 @@ public class SDDetailPanel extends FormComponentPanel
     public SDDetailPanel( String id, Displayable display, boolean isStatic )
     {
         super( id );
-        this.adminMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.adminMgr.setAdmin( SecUtils.getSession( this ) );
         this.isStatic = isStatic;
         this.editForm = new SDDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<SDSet>(
new SDSet() ) );
         this.display = display;

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/SDListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/SDListPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/SDListPanel.java
index e25af17..5a076c5 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/SDListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/SDListPanel.java
@@ -22,7 +22,6 @@ package org.apache.directory.fortress.web.panel;
 
 
 import com.inmethod.grid.IGridColumn;
-import com.inmethod.grid.SizeUnit;
 import com.inmethod.grid.column.PropertyColumn;
 import com.inmethod.grid.treegrid.TreeGrid;
 import org.apache.log4j.Logger;
@@ -40,7 +39,7 @@ import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.SDListModel;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
@@ -55,7 +54,6 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
 
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -103,7 +101,7 @@ public class SDListPanel extends FormComponentPanel
             searchLabel = "DSD Name";
             opName = "dsdRoleSets";
         }
-        SDListModel sdListModel = new SDListModel( sdSet, GlobalUtils.getRbacSession( this
) );
+        SDListModel sdListModel = new SDListModel( sdSet, SecUtils.getSession( this ) );
         setDefaultModel( sdListModel );
         List<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>> columns
=
             new ArrayList<IGridColumn<DefaultTreeModel, DefaultMutableTreeNode, String>>();
@@ -229,7 +227,7 @@ public class SDListPanel extends FormComponentPanel
                         break;
                 }
 
-                setDefaultModel( new SDListModel( srchSd, GlobalUtils.getRbacSession( this
) ) );
+                setDefaultModel( new SDListModel( srchSd, SecUtils.getSession( this ) ) );
                 treeModel.reload();
                 rootNode.removeAllChildren();
                 List<SDSet> sdSets = ( List<SDSet> ) getDefaultModelObject();

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/UserDetailPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/UserDetailPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/UserDetailPanel.java
index 2792d9a..495519b 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/UserDetailPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/UserDetailPanel.java
@@ -48,7 +48,7 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
 import org.apache.directory.fortress.web.SelectModelEvent;
@@ -91,8 +91,8 @@ public class UserDetailPanel extends FormComponentPanel
         super( id );
         this.editForm = new UserDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<User>(
new User() ) );
         this.display = display;
-        this.adminMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
-        this.delAdminMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.adminMgr.setAdmin( SecUtils.getSession( this ) );
+        this.delAdminMgr.setAdmin( SecUtils.getSession( this ) );
         add( editForm );
     }
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
index 71bb2eb..6ec8cb7 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
@@ -22,7 +22,6 @@ package org.apache.directory.fortress.web.panel;
 
 
 import com.inmethod.grid.IGridColumn;
-import com.inmethod.grid.SizeUnit;
 import com.inmethod.grid.column.PropertyColumn;
 import com.inmethod.grid.treegrid.TreeGrid;
 import org.apache.log4j.Logger;
@@ -46,7 +45,7 @@ import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.Model;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.web.SaveModelEvent;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxButton;
 import org.apache.directory.fortress.web.SecureIndicatingAjaxLink;
@@ -62,7 +61,6 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
 
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -118,7 +116,7 @@ public class UserListPanel extends FormComponentPanel
     public UserListPanel( String id )
     {
         super( id );
-        UserListModel userListModel = new UserListModel( new User(), GlobalUtils.getRbacSession(
this ) );
+        UserListModel userListModel = new UserListModel( new User(), SecUtils.getSession(
this ) );
         setDefaultModel( userListModel );
         addGrid();
         userformsearchfields = new WebMarkupContainer( "userformsearchfields" );
@@ -245,7 +243,7 @@ public class UserListPanel extends FormComponentPanel
                     Permission srchPerm = new Permission();
                     srchPerm.setObjName( searchData.getField1() );
                     srchPerm.setOpName( searchData.getField2() );
-                    setDefaultModel( new UserListModel( srchPerm, GlobalUtils.getRbacSession(
this ) ) );
+                    setDefaultModel( new UserListModel( srchPerm, SecUtils.getSession( this
) ) );
                 }
                 else
                 {
@@ -274,7 +272,7 @@ public class UserListPanel extends FormComponentPanel
                     {
                         LOG.debug( ".onSubmit PERMS RB selected" );
                     }
-                    setDefaultModel( new UserListModel( srchUser, GlobalUtils.getRbacSession(
this ) ) );
+                    setDefaultModel( new UserListModel( srchUser, SecUtils.getSession( this
) ) );
                 }
 
                 treeModel.reload();

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
index 1278b14..0a52570 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
@@ -25,7 +25,6 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 
-import org.apache.directory.fortress.core.rbac.Role;
 import org.apache.directory.fortress.core.util.attr.VUtil;
 import org.apache.log4j.Logger;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -40,7 +39,7 @@ import org.apache.wicket.model.LoadableDetachableModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.directory.fortress.web.GlobalIds;
-import org.apache.directory.fortress.web.GlobalUtils;
+import org.apache.directory.fortress.web.SecUtils;
 import org.apache.directory.fortress.core.ReviewMgr;
 import org.apache.directory.fortress.core.rbac.User;
 
@@ -69,7 +68,7 @@ public class UserSearchModalPanel extends Panel
     {
         super( id );
         // TODO: add later:
-        this.reviewMgr.setAdmin( GlobalUtils.getRbacSession( this ) );
+        this.reviewMgr.setAdmin( SecUtils.getSession( this ) );
         this.window = window;
         loadPanel();
     }

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/resources/applicationContext.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/applicationContext.xml b/src/main/resources/applicationContext.xml
index 2e2ef79..817003a 100644
--- a/src/main/resources/applicationContext.xml
+++ b/src/main/resources/applicationContext.xml
@@ -82,6 +82,11 @@
           factory-method="createInstance">
         <constructor-arg value="HOME"/>
     </bean>
+    <!-- The Fortress Realm J2EE Manager bean used for deserializing the principal as
returned from tomcat -->
+    <bean id="j2eePolicyMgr" class="org.apache.directory.fortress.realm.J2eePolicyMgrFactory"
scope="prototype"
+          factory-method="createInstance">
+    </bean>
+
 
     <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
         <property name="targetObject">

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/8fb94a07/src/main/resources/fortress.properties.example
----------------------------------------------------------------------
diff --git a/src/main/resources/fortress.properties.example b/src/main/resources/fortress.properties.example
index 12ce3c5..ec33f68 100644
--- a/src/main/resources/fortress.properties.example
+++ b/src/main/resources/fortress.properties.example
@@ -17,6 +17,9 @@
 #   under the License.
 #
 
+# Used by application security components:
+perms.cached=true
+
 # Host name and port of LDAP DIT:
 host=localhost
 #host=localhost
@@ -48,7 +51,6 @@ debug.ldap.pool=true
 enable.pool.reconnect=true
 
 ehcache.config.file=ehcache.xml
-perms.cached=true
 
 # This will override default LDAP manager implementations for the RESTful ones:
 #enable.mgr.impl.rest=true


Mime
View raw message