portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r608703 - /portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/security/users/UserDetailsPortlet.java
Date Fri, 04 Jan 2008 01:34:27 GMT
Author: smilek
Date: Thu Jan  3 17:34:26 2008
New Revision: 608703

URL: http://svn.apache.org/viewvc?rev=608703&view=rev
Log:
edited removeUser method, moving the use of Preferences object to precede deletion of the
user - this prevents exception which occurred just prior to logging the deletion to admin_activity

Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/security/users/UserDetailsPortlet.java

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/security/users/UserDetailsPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/security/users/UserDetailsPortlet.java?rev=608703&r1=608702&r2=608703&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/security/users/UserDetailsPortlet.java
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/security/users/UserDetailsPortlet.java
Thu Jan  3 17:34:26 2008
@@ -653,6 +653,8 @@
             try
             {
                 Preferences attributes = user.getUserAttributes();
+                String firstName = attributes.get("user.name.given", "n/a");
+                String lastName =  attributes.get("user.name.family", "n/a");
                 String subsite = attributes.get(User.USER_INFO_SUBSITE, null);          
     
                 userManager.removeUser(userName);
                 PortletMessaging.publish(actionRequest, SecurityResources.TOPIC_USERS, SecurityResources.MESSAGE_REFRESH,
"true");
@@ -664,15 +666,12 @@
                 {
                     Folder folder = pageManager.getFolder(subsite);                    
                     pageManager.removeFolder(folder);
-                }    
-                String firstName = attributes.get("user.name.given", "n/a");
-                String lastName =  attributes.get("user.name.family", "n/a");
+                }
                 audit.logAdminAttributeActivity(actionRequest.getUserPrincipal().getName(),

                         getIPAddress(actionRequest), userName, AuditActivity.USER_DELETE,
"", firstName, lastName, USER_ADMINISTRATION);                                           
                                                            
                 // remove selected user from USERS_TOPIC
                 PortletMessaging.cancel(actionRequest,SecurityResources.TOPIC_USERS, SecurityResources.MESSAGE_SELECTED);
-                // TODO: send message to site manager portlet
-                
+                // TODO: send message to site manager portlet                
             }
             catch (Exception ex)
             {
@@ -1167,7 +1166,7 @@
                 }
                 
                 String requiredRole = actionRequest.getPreferences().getValue("requiredRole",
"");
-                if (!SecurityUtil.isEmpty(requiredRole)  && user != null)       
        
+                if (!SecurityUtil.isEmpty(requiredRole)  && user != null)
                 {
                     roleManager.addRoleToUser(userName, requiredRole);
                 }
@@ -1196,7 +1195,7 @@
                 {
                     Folder source = pageManager.getFolder(templateFolder);              
 
                     pageManager.deepCopyFolder(source, subsite, userName);
-                }               
+                }
                 // TODO: send message that site tree portlet invalidated
                 
                 String rule = actionRequest.getParameter(RULES_CONTROL);



---------------------------------------------------------------------
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