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

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
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()) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.