[Commits] (bcm) treat the seeded root user as any other user in the web ui - it shows up in

commits at osafoundation.org commits at osafoundation.org
Fri Apr 15 13:20:06 PDT 2005


Commit by: bcm
Modified files:
server/core/src/org/osaf/cosmo/manager/impl/ProvisioningManagerImpl.java 1.2 1.3
server/etc/log4j.xml 1.4 1.5
server/web/src/org/osaf/cosmo/ui/UserAction.java 1.7 1.8

Log message:
treat the seeded root user as any other user in the web ui - it shows up in
the user list, its password can be changed, and it can be deleted. the only
difference is that it will never have a homedir.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/server/core/src/org/osaf/cosmo/manager/impl/ProvisioningManagerImpl.java.diff?r1=text&tr1=1.2&r2=text&tr2=1.3
http://cvs.osafoundation.org/index.cgi/server/etc/log4j.xml.diff?r1=text&tr1=1.4&r2=text&tr2=1.5
http://cvs.osafoundation.org/index.cgi/server/web/src/org/osaf/cosmo/ui/UserAction.java.diff?r1=text&tr1=1.7&r2=text&tr2=1.8

Index: server/core/src/org/osaf/cosmo/manager/impl/ProvisioningManagerImpl.java
diff -u server/core/src/org/osaf/cosmo/manager/impl/ProvisioningManagerImpl.java:1.2 server/core/src/org/osaf/cosmo/manager/impl/ProvisioningManagerImpl.java:1.3
--- server/core/src/org/osaf/cosmo/manager/impl/ProvisioningManagerImpl.java:1.2	Wed Apr 13 16:50:26 2005
+++ server/core/src/org/osaf/cosmo/manager/impl/ProvisioningManagerImpl.java	Fri Apr 15 13:20:05 2005
@@ -6,6 +6,7 @@
 import org.osaf.cosmo.manager.ProvisioningManager;
 import org.osaf.cosmo.model.Role;
 import org.osaf.cosmo.model.User;
+import org.osaf.cosmo.security.CosmoSecurityManager;
 
 import java.security.MessageDigest;
 import java.util.List;
@@ -98,10 +99,11 @@
      */
     public User saveUser(User user) {
         user.setPassword(digestPassword(user.getPassword()));
-
         userDao.saveUser(user);
 
-        shareDao.createHomedir(user.getUsername());
+        if (! user.getUsername().equals(CosmoSecurityManager.USER_ROOT)) {
+            shareDao.createHomedir(user.getUsername());
+        }
 
         return userDao.getUser(user.getUsername());
     }
@@ -121,7 +123,9 @@
      */
     public void removeUser(String id) {
         User user = getUser(id);
-        shareDao.deleteHomedir(user.getUsername());
+        if (! user.getUsername().equals(CosmoSecurityManager.USER_ROOT)) {
+            shareDao.deleteHomedir(user.getUsername());
+        }
         userDao.removeUser(user);
     }
 

Index: server/etc/log4j.xml
diff -u server/etc/log4j.xml:1.4 server/etc/log4j.xml:1.5
--- server/etc/log4j.xml:1.4	Tue Apr 12 15:57:37 2005
+++ server/etc/log4j.xml	Fri Apr 15 13:20:05 2005
@@ -17,21 +17,17 @@
     <level value="WARN"/>
   </logger>
 
-<!--
   <logger name="net.sf.acegisecurity">
-    <level value="DEBUG"/>
+    <level value="WARN"/>
   </logger>
--->
 
   <logger name="org.apache">
     <level value="WARN"/>
   </logger>
 
-<!--
   <logger name="org.apache.jackrabbit">
-    <level value="DEBUG"/>
+    <level value="WARN"/>
   </logger>
--->
 
   <logger name="org.apache.catalina.startup.Catalina">
     <level value="INFO"/>

Index: server/web/src/org/osaf/cosmo/ui/UserAction.java
diff -u server/web/src/org/osaf/cosmo/ui/UserAction.java:1.7 server/web/src/org/osaf/cosmo/ui/UserAction.java:1.8
--- server/web/src/org/osaf/cosmo/ui/UserAction.java:1.7	Fri Apr 15 12:32:35 2005
+++ server/web/src/org/osaf/cosmo/ui/UserAction.java	Fri Apr 15 13:20:05 2005
@@ -219,15 +219,6 @@
         List users = mgr.getUsers();
         Collections.sort(users);
 
-        // filter out the root user; we never want to allow it to be
-        // managed via the web interface
-        for (Iterator i=users.iterator(); i.hasNext();) {
-            User user = (User) i.next();
-            if (user.getUsername().equals(CosmoSecurityManager.USER_ROOT)) {
-                i.remove();
-            }
-        }
-
         return users;
     }
 



More information about the Commits mailing list