Commits

Anonymous committed 4fed7eb

Updated propertyset
Call remove on profileprovider for groups and users

  • Participants
  • Parent commits f4fe933

Comments (0)

Files changed (7)

     <property name="src.test" value="${src}/test"/>
     <property name="src.etc" value="${src}/etc"/>
 
-    <property name="propertyset.jar" value="propertyset-1.3-22Dec03.jar"/>
+    <property name="propertyset.jar" value="propertyset-1.3-25Dec03.jar"/>
     <property name="oscore.jar" value="oscore-2.2.2-18Dec03.jar"/>
 
     <property name="build" value="build"/>

example/META-INF/application.xml

 		<ejb>oscore-2.2.2-18Dec03.jar</ejb>
 	</module>
 	<module>
-			<ejb>propertyset-1.3-22Dec03.jar</ejb>
+			<ejb>propertyset-1.3-25Dec03.jar</ejb>
 	</module>
 
 	<module>

lib/core/propertyset-1.3-22Dec03.jar

Binary file removed.

lib/core/propertyset-1.3-25Dec03.jar

Binary file added.

src/java/com/opensymphony/user/Group.java

 package com.opensymphony.user;
 
 import com.opensymphony.user.provider.AccessProvider;
+import com.opensymphony.user.provider.ProfileProvider;
 
 import java.io.Serializable;
 
  * <p>Refer to Entity for more information.</p>
  *
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision: 1.2 $
  *
  * @see com.opensymphony.user.Entity
  */
         if (!accessProvider.remove(name)) {
             throw new ImmutableException();
         }
+
+        ProfileProvider profileProvider = getProfileProvider();
+
+        if (profileProvider != null) {
+            profileProvider.remove(name);
+        }
     }
 
     /**

src/java/com/opensymphony/user/User.java

 package com.opensymphony.user;
 
 import com.opensymphony.user.provider.CredentialsProvider;
+import com.opensymphony.user.provider.ProfileProvider;
 
 import java.io.Serializable;
 
  * <p>Refer to Entity for more information.</p>
  *
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
  *
  * @see com.opensymphony.user.Entity
  */
         if (!credentialsProvider.remove(name)) {
             throw new ImmutableException("Credentials provider failed to remove user");
         }
+
+        ProfileProvider profileProvider = getProfileProvider();
+
+        if (profileProvider != null) {
+            profileProvider.remove(name);
+        }
     }
 
     /**

src/java/com/opensymphony/user/provider/ejb/EJBProfileProvider.java

 /**
  * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
  * @author <a href="mailto:mike@atlassian.com">Mike Cannon-Brookes</a>
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
  */
 public class EJBProfileProvider implements ProfileProvider {
     //~ Static fields/initializers /////////////////////////////////////////////
     }
 
     public boolean remove(String name) {
-        return true;
+        try {
+            PropertySet ps = getPropertySet(name);
+
+            if (ps != null) {
+                ps.remove();
+            }
+        } catch (Exception ex) {
+            log.error("Error removing propertyset for " + name, ex);
+        }
+
+        return false;
     }
 
     public boolean store(String name, Entity.Accessor accessor) {