You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/12/14 17:36:55 UTC

svn commit: r604220 - /lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js

Author: andreas
Date: Fri Dec 14 08:36:55 2007
New Revision: 604220

URL: http://svn.apache.org/viewvc?rev=604220&view=rev
Log:
Don't remove all members when changing the group affililation, but only the users which aren't assigned anymore.

Modified:
    lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js

Modified: lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js?rev=604220&r1=604219&r2=604220&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js Fri Dec 14 08:36:55 2007
@@ -162,7 +162,13 @@
             }
             
             if (cocoon.request.getParameter("submit")) {
-                group.removeAllMembers();
+                var oldMembers = group.getMembers();
+                for (var i = 0; i < oldMembers.length; i++) {
+                    if (java.lang.Class.forName("org.apache.lenya.ac.User").isInstance(oldMembers[i])
+                        && !groupUsers.contains(oldMembers[i])) {
+                        group.remove(oldMembers[i]);
+                    }
+                }
                 
                 var userIterator = groupUsers.iterator();
                 while (userIterator.hasNext()) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org