Skip to content

Instantly share code, notes, and snippets.

@cer28
cer28 / removeDefaultOwnerPermissions.groovy
Last active October 4, 2018 13:23
Grouper gsh (groovy) script to remove admin permissions from a defined set of users
/****
*
* removeDefaultOwnerPermissions.groovy
*
* In Grouper 2.4.0, when new groups and stems are created, the creator is no longer added as an admin
* if they are in the wheel group. The explicit access is unnecessary since users in the wheel group automatically
* have admin access even without the permission. This script performs a cleanup of these permissions, looping through
* a defined list of subjects (mixed ids/identifiers), and removing the admin access from the groups and stems.
* This cleanup could remove many thousands of excess memberships from the database, possibly improving performance.
*