portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r700789 - in /portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src: main/java/org/apache/jetspeed/portlets/security/permissions/SecurityPermissionsPortlet.java webapp/WEB-INF/security/permissions/view.vm
Date Wed, 01 Oct 2008 14:35:07 GMT
Author: ate
Date: Wed Oct  1 07:35:06 2008
New Revision: 700789

URL: http://svn.apache.org/viewvc?rev=700789&view=rev
Log:
Adjusting for the new PermissionsManager api (work in progress)

Modified:
    portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/main/java/org/apache/jetspeed/portlets/security/permissions/SecurityPermissionsPortlet.java
    portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/webapp/WEB-INF/security/permissions/view.vm

Modified: portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/main/java/org/apache/jetspeed/portlets/security/permissions/SecurityPermissionsPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/main/java/org/apache/jetspeed/portlets/security/permissions/SecurityPermissionsPortlet.java?rev=700789&r1=700788&r2=700789&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/main/java/org/apache/jetspeed/portlets/security/permissions/SecurityPermissionsPortlet.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/main/java/org/apache/jetspeed/portlets/security/permissions/SecurityPermissionsPortlet.java
Wed Oct  1 07:35:06 2008
@@ -37,6 +37,7 @@
 import org.apache.jetspeed.headerresource.HeaderResource;
 import org.apache.jetspeed.security.JetspeedPermission;
 import org.apache.jetspeed.security.JetspeedPrincipal;
+import org.apache.jetspeed.security.JetspeedPrincipalType;
 import org.apache.jetspeed.security.PermissionFactory;
 import org.apache.jetspeed.security.PermissionManager;
 import org.apache.jetspeed.security.Role;
@@ -171,15 +172,7 @@
             this.permission = permission;
             this.roles = "";
             List<JetspeedPrincipal> principals = null;
-            try
-            {
-                principals = pm.getPrincipals(permission);
-            }
-            catch (SecurityException e)
-            {
-                logger.error(e);
-                return;
-            }
+            principals = pm.getPrincipals(permission, JetspeedPrincipalType.ROLE);
             int size = principals.size();
             if (size == 0)
             {

Modified: portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/webapp/WEB-INF/security/permissions/view.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/webapp/WEB-INF/security/permissions/view.vm?rev=700789&r1=700788&r2=700789&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/webapp/WEB-INF/security/permissions/view.vm
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/security-refactoring/src/webapp/WEB-INF/security/permissions/view.vm
Wed Oct  1 07:35:06 2008
@@ -170,7 +170,7 @@
 
                 <b>Roles</b><br />
                 #foreach ($role in $roles)
-                <input type="checkbox" name="role_$velocityCount" id="role_$velocityCount"
dojoType="Checkbox" /> <label for="role_$velocityCount">$role.Principal.Name</label><br
/>
+                <input type="checkbox" name="role_$velocityCount" id="role_$velocityCount"
dojoType="Checkbox" /> <label for="role_$velocityCount">$role.Name</label><br
/>
                 #end
 
             </div>
@@ -201,7 +201,7 @@
 <script language="JavaScript" type="text/javascript">
     rolePrincipals = new Array();
 #foreach ($role in $roles)
-    rolePrincipals.push( "$role.Principal.Name" );
+    rolePrincipals.push( "$role.Name" );
 #end
     actionNames = new Array();
     actionNames.push( "view" );



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message