Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore "delete principal from group" listener invocation #5584

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/src/org/labkey/api/security/SecurityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,11 @@ public static void deleteMembers(Group group, Collection<UserPrincipal> membersT
GroupMembershipCache.handleGroupChange(group, member);
}, CommitTaskOption.IMMEDIATE, CommitTaskOption.POSTCOMMIT, CommitTaskOption.POSTROLLBACK);

transaction.addCommitTask( () -> {
for (UserPrincipal member : membersToDelete)
fireDeletePrincipalFromGroup(group.getUserId(), member);
}, CommitTaskOption.POSTCOMMIT);

if (!group.isProjectGroup())
ensureAtLeastOneRootAdminExists();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,9 +910,10 @@ else if (topMessage.equals("Zip bomb detected!"))
// Tika flags some files as "zip bombs"
logAsWarning(r, "Can't parse this file", rootMessage);
}
else if (topMessage.equals("Unable to unpack document stream"))
// "org.apache.commons.compress.archivers.ArchiveException: No Archiver found for the stream signature" OR
// "org.tukaani.xz.UnsupportedOptionsException: LZMA dictionary is too big for this implementation"
else if (topMessage.equals("Unable to unpack document stream") || rootMessage.equals("LZMA dictionary is too big for this implementation"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double-checking that you want this in the same PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, intentional

{
// Usually "org.apache.commons.compress.archivers.ArchiveException: No Archiver found for the stream signature"
logAsWarning(r, "Can't decompress this file", rootMessage);
}
else if (StringUtils.endsWithIgnoreCase(r.getName(), ".chm"))
Expand Down