Skip to content

disband, reinstate PI groups#560

Merged
simonLeary42 merged 36 commits intomainfrom
disband
Jan 23, 2026
Merged

disband, reinstate PI groups#560
simonLeary42 merged 36 commits intomainfrom
disband

Conversation

@simonLeary42
Copy link
Member

@simonLeary42 simonLeary42 commented Jan 21, 2026

This is a clone of #520 which I accidentally broke

Closes #392

Puts back the old "disband PI" functionality (removed in #207) using the term "disable" instead of "disband". A PI group can now have the isDisabled attribute set to "TRUE" and it will be ignored by the portal. If a PI is once again approved for a PI group, the old group will have isDisabled set to "FALSE" or unset.

Note: Disabled PI groups should have no members.

Note: I used OIDs 1.1.1 and 1.1.2 for my new LDAP stuff. 1.1 is documented as a "dead namespace" in OID land and is advisable for "private experiments". copilot doesn't like that I did this.

Note: if a large PI group is disabled by an admin, while updating the qualified status of each member, the portal will query for the members' attributes one-at-a-time and then do $user->getPIGroupGIDs() one-at-a-time, which is a lot of LDAP queries. I implemented an optimized version of this, but it's very ugly.

Test cases added:

  • UnityGroup->setIsDisabled() changes return value of future UnityGroup->getIsDisabled()
  • when user is re-approved and old disabled group is re-enabled, $user->isPI() returns true
  • when PI group is disabled by an admin in pi-mgmt.php, $group->getIsDisabled() returns true and $owner->isPI() returns false
  • when PI group is disabled voluntarily by the owner in pi.php, $group->getIsDisabled() returns true and $owner->isPI() returns false
  • groups with isDisabled unset and groups with isDisabled = "FALSE" are both displayed in pi-mgmt.php
  • when PI group is disabled, members become unqualified
  • PI is not able to disable their group if the group still has members, but an admin can
Screen.Recording.2026-01-22.at.10.59.48.AM.mov

@simonLeary42 simonLeary42 merged commit 975b1ff into main Jan 23, 2026
3 checks passed
@simonLeary42 simonLeary42 deleted the disband branch January 23, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

put back "disband PI" functionality

2 participants