Skip to content

Commit

Permalink
correct group expiration messages and version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cgeorgilakis-grnet committed Nov 15, 2024
1 parent 6e55ffe commit af0489c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes in keycloak-group-management will be documented in this file
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0rc3]
## [1.0.0] - 2024-11-15

### Changed
- Change suspend and reactivate email
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<quarkus.version>3.2.7.Final</quarkus.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<agm-version>1.0.0rc3</agm-version>
<agm-version>1.0.0</agm-version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ public void sendGroupAdminEnrollmentCreationEmail(UserModel userRequest, String
send("groupadminEnrollmentRequestCreationSubject", Stream.of(groupPath).collect(Collectors.toList()), "groupadmin-enrollment-creation.ftl", attributes);
}

public void sendExpiredGroupMemberEmailToAdmin(UserModel userRequest, String groupname, List<String> subgroupsPaths) throws EmailException {
public void sendExpiredGroupMemberEmailToAdmin(UserModel userRequest, String groupPath, List<String> subgroupsPaths) throws EmailException {
attributes.put("fullname", user.getFirstName() + " " + user.getLastName());
attributes.put("userName", userRequest.getFirstName() + " " + userRequest.getLastName());
attributes.put("groupname", groupname);
attributes.put("groupPath", groupPath);
attributes.put("subgroupsStr", subgroupsStrCalculation(subgroupsPaths));
attributes.put("signatureMessage", signatureMessage);
send("adminGroupUserRemovalSubject", "expired-group-membership-admin.ftl", attributes);
send("adminGroupUserRemovalSubject", Stream.of(groupPath).collect(Collectors.toList()), "expired-group-membership-admin.ftl", attributes);
}

public void sendExpiredGroupMemberEmailToUser(String groupPath, String groupId, List<String> subgroupsPaths, String serverUrl) throws EmailException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void dailyExecutedActions() {
groupAdminRepository.getAllAdminIdsGroupUsers(group).map(id -> session.users().getUserById(realm, id)).filter(Objects::nonNull).forEach(admin -> {
customFreeMarkerEmailTemplateProvider.setUser(admin);
try {
customFreeMarkerEmailTemplateProvider.sendExpiredGroupMemberEmailToAdmin(user, group.getName(), subgroupsPaths);
customFreeMarkerEmailTemplateProvider.sendExpiredGroupMemberEmailToAdmin(user, ModelToRepresentation.buildGroupPath(group), subgroupsPaths);
} catch (EmailException e) {
logger.warn("problem sending email to group admin " + admin.getFirstName() + " " + admin.getLastName());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<body>
${kcSanitize(msg("adminGroupUserRemovalBody",fullname, userName, groupname, subgroupsStr, signatureMessage))?no_esc}
${kcSanitize(msg("adminGroupUserRemovalBody",fullname, userName, groupPath, subgroupsStr, signatureMessage))?no_esc}
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ acceptRejectEnrollmentBody=Dear {0},\n\n Your request for joining to {1} group h
acceptRejectEnrollmentBodyHtml=<p>Dear {0},</p><p>Your request for joining <b>{1}</b> group has been <b>{2}</b>.<br> {3}</p><p>Thank you,<br>{4}</p>
acceptEnrollmentSubject= Request for joining {0} group has been accepted
rejectEnrollmentSubject= Request for joining {0} group has been rejected
groupadminEnrollmentRequestCreationBody=Dear {0},\n\n {1} has requested to join the {2} group with the following roles:\n{3}\n{4}\nPlease visit the following link n order to view and process the enrollment request:\n{5}\n\nThank you,\n{6}
groupadminEnrollmentRequestCreationBodyHtml=<p>Dear {0},</p><p>{1} has requested to join the {2} group with the following roles:<br>{3}<br>{4}</p><p>Please visit the following link n order to view and process the enrollment request:<br>{5}</p><p>Thank you,<br>{6}</p>
groupadminEnrollmentRequestCreationBody=Dear {0},\n\n {1} has requested to join the {2} group with the following roles:\n{3}\n{4}\nPlease visit the following link in order to view and process the enrollment request:\n{5}\n\nThank you,\n{6}
groupadminEnrollmentRequestCreationBodyHtml=<p>Dear {0},</p><p>{1} has requested to join the {2} group with the following roles:<br>{3}<br>{4}</p><p>Please visit the following link in order to view and process the enrollment request:<br>{5}</p><p>Thank you,<br>{6}</p>
groupadminEnrollmentRequestCreationSubject= New enrollment request for {0} group
groupInvitationBody=You have been invited by {0} to join the {1} group.\n{2}\n{3}\nThe group path is {4}\nPlease follow the following link: {5}\n\nPlease note that this invitation will {6}.\n\nThank you,\n{7}
groupInvitationBodyHtml=<p>You have been invited by <strong>{0}</strong> to join the <strong>{1}</strong> group.</p><h4>{2}</h4><p>{3}<br><br>The group path is <strong>{4}</strong></p><a href="{5}" style="border-radius: 4px;color: white;background-color: #0077c8;text-decoration: none;display: inline-block;margin: 0;cursor:pointer;padding: 10px 10px;font-size: 20px;max-width: 150px;max-height: 30px">Join this group</a><p>You can also click the following link: <a href="{6}">{7}</a> </p><p>Please note that this invitation will {8}.</p><p>Thank you,<br>{9}</p>
Expand All @@ -38,13 +38,13 @@ groupAcceptInvitationSubject= Invitation for {0} {1} group has been accepted
groupRejectionInvitationSubject= Invitation for {0} {1} group has been rejected
adminGroupUserRemovalBody=Dear {0},\n\n {1} has been removed from group {2} {3} due to membership expiration.\n\nThank you,\n{4}
adminGroupUserRemovalBodyHtml=<p>Dear {0},</p><p>{1} has been removed from group {2} {3} due to membership expiration.</p><p>Thank you,<br>{4}</p>
adminGroupUserRemovalSubject= Membership for group {0} has expired
adminGroupUserRemovalSubject= Membership expired notification for group {0}
userRemovalBody=Dear {0},Your membership in group {1} {2} has expired. Please follow this link in order to request membership in this group : \n{3}\n\nThank you,\n{4}
userRemovalBodyHtml=<p>Dear {0},</p><p>Your membership in group <b>{1}</b> {2} has expired.<br> Please follow <a href="{3}">this link</a> in order to request membership in this group.</p><p>Thank you,<br>{4}</p>
userRemovalSubject= Group removal
userRemovalSubject= Membership expired notification for group {0}
groupMembershipExpirationNotificationBody=Dear {0},\n\n Your membership in {1} group expires in {2}.\n\n Please follow the link below in order to renew your membership:\n {3}.\n\nThank you,\n{4}
groupMembershipExpirationNotificationBodyHtml=<p>Dear {0},</p><p>Your membership in <b>{1}</b> group expires in {2}.Please follow <a href="{3}">this link</a> in order to renew your membership.</p><p>Thank you,<br>{4}</p>
groupMembershipExpirationNotificationSubject= Membership expiration notification for group {0}
groupMembershipExpirationNotificationSubject= Membership expiration warning for group {0}
addRemoveGroupAdminAdminInformationBody= This is to inform you that {0} has been {1} by {2} {3} an administrator for the {4} group.\nFor more information about the group, please visit the following link:\n {5}\n\nThank you,\n{6}
addRemoveGroupAdminAdminInformationBodyHtml= This is to inform you that {0} has been {1} by {2} {3} an administrator for the {4} group.<p>For more information about the group, please visit the following link: <br>{5}</p><p>Thank you,<br>{6}</p>
addGroupAdminAdminInformationSubject= New Group Administrator Added for {0}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<#ftl output_format="plainText">
${msg("groupadminEnrollmentCreationBody",fullname, userName, groupname, subgroupsStr, signatureMessage)}
${msg("groupadminEnrollmentCreationBody",fullname, userName, groupPath, subgroupsStr, signatureMessage)}

0 comments on commit af0489c

Please sign in to comment.