Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Fix/4.0.x/plf 5377 #357

Open
wants to merge 1 commit into
base: stable/4.0.x
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ public static void createProfileFolder(Session session, String username) throws
}

public static void createMembershipFolder(Session session, Membership membership) throws Exception {
if (!hasUserFolder(session, membership.getUserName())) {
LOG.debug("listeners of user " + membership.getUserName() + " aren't executed, ignore membership integration feature.");
return;
}
if (!hasGroupFolder(session, membership.getGroupId())) {
LOG.debug("listeners of group " + membership.getGroupId() + " aren't executed, ignore membership integration feature.");
return;
}
createFolder(getMembershipsFolder(session), membership.getGroupId().replace("/", SPECIAL_CHARACTER_REPLACEMENT)
+ MEMBERSHIP_SEPARATOR + membership.getMembershipType().replace("*", SPECIAL_CHARACTER_REPLACEMENT)
+ MEMBERSHIP_SEPARATOR + membership.getUserName());
Expand Down Expand Up @@ -339,4 +347,4 @@ public static String computeId(Membership membership) {
return id.toString();
}

}
}