Skip to Content.
Sympa Menu

grouper-users - [grouper-users] How to delete direct memberships without touching subgroups and their members

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] How to delete direct memberships without touching subgroups and their members


Chronological Thread 
  • From: Rory Larson <>
  • To: "" <>
  • Subject: [grouper-users] How to delete direct memberships without touching subgroups and their members
  • Date: Sat, 10 Feb 2018 01:52:03 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:cF085RJ3HtlHyo5Q9tmcpTZWNBhigK39O0sv0rFitYgeL/TxwZ3uMQTl6Ol3ixeRBMOHs6sC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffxhEiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhicZOTAk7GHZhM9+jKNHrxyuqBNy2JLUYJiJOPZiYq/RYc0WSGxcVchRTSxBBYa8YpMTAeoGJ+ZZr5T2qV0UohukHgmsA+XvwSJPi3/s2a01yf4hERrB3AwmAt4Dq2nUrNPxNKsIT++60bTIwCzFYvhL2jn98JDFfg48rfyNR759f9TdxVMyGw7Gk1mcs5HpMjCa2+gVrmSX8e5tWfirhmMpsQ18rSKjytkuh4XRiIIa1FPJ+Tl8zYswKtC3VE52bsOhHZROtCyWKo57T8c4TGxopSk3z7MLtoK7cSUIzpks2gTRZOadc4eS5xLuTOaRLil8hHJiYL+xnwq//0+8xuHhT8W5zVRFojRcntnLrX8CyQbf6s+aSvth5Uih3iuP1wbO5e1eOUA0j63bK4I/zbEsipoTsEPDHinslEXxka+WakEk+u+v6+TkeLnpupicN4pshgH/NKQhhNC/DPwmPgQTXmWX4+qx2KP58UHkQ7hGk+c6nrTavZ3VPcgbo7S2Aw5R0oYt8Ra/CDKm3cwCnXkDNl1FYgmHj4/vO13TO/34EPG/g1C2nDh12v/GI6XtAo/RIXjbjLfhYbF95lZTyAopytBf+opUBa8bIP7qR0/xr8LXDgUiMwGvx+bnCc591p8FWW6RGKOZMaXSsUOW6eI1JemDepMVtCjnJ/c7+vHukCxxpVhIN6az2oYPZWr9A+9rOV6xYHzwj80HHHtQ+AcyUaai3FKYViNLamz3Qrkx/CoTCYS6AJ3FS5z3xrGNwXHoMIdRYzV8DUqdWVPhbZ6DXb9YciabONRmlGUsSL6lDYItyEf950fB17N7I7+MqWUjvpX52Y0t6g==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Hello,

I have a group with largely redundant membership. It was originally created
with direct memberships from one data source, and then given a few groups
from another data source that had most of the same people, in a process
intended to be a smooth transition. Now I would like to remove all the old
direct memberships from the group, leaving only the new subgroups with their
members.

When I try this through the Grouper New UI, marking all direct members on the
page for deletion, it grinds for a while, deletes a few members, and then
crashes with a pink error message telling me to start over. It works as
advertised for the few it does delete, but since I'm dealing with a
membership of over 7500, this route does not look promising.

I would like to handle this through gsh, but I'm having trouble figuring out
how to filter. The query I've been developing might look something like this:

$ for (mem : getMembers("my:group:name")) {System.out.println("deleting: " +
mem.getName()); mem.delete();}

But I'm queasy about using this, because I'm not sure what all I'm deleting,
and where. I don't want to delete my subgroups, and I don't want to delete
anybody inside those subgroups. I tried testing with an if statement to
check names against who shows up with direct and indirect memberships in the
New UI, and was disappointed to discover that getMembers() returns both
direct and indirect members.

Is there a method that will return only the direct members of a group, but
not member groups? Or is there a filter I could use to select only the ones
I want through an if statement?

Thanks,
Rory




Archive powered by MHonArc 2.6.19.

Top of Page