File tree 3 files changed +8
-9
lines changed
server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain
3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 14
14
15
15
public interface OrganizationService {
16
16
17
+ public static final String PASSWORD_RESET_EMAIL_TEMPLATE_DEFAULT = "<p>Hi, %s<br/>" +
18
+ "Here is the link to reset your password: %s<br/>" +
19
+ "Please note that the link will expire after 12 hours.<br/><br/>" +
20
+ "Regards,<br/>" +
21
+ "The Lowcoder Team</p>" ;
22
+
17
23
@ PossibleEmptyMono
18
24
Mono <Organization > getOrganizationInEnterpriseMode ();
19
25
Original file line number Diff line number Diff line change 51
51
public class OrganizationServiceImpl implements OrganizationService {
52
52
53
53
private Conf <Integer > logoMaxSizeInKb ;
54
-
55
- private static final String PASSWORD_RESET_EMAIL_TEMPLATE_DEFAULT = "<p>Hi, %s<br/>" +
56
- "Here is the link to reset your password: %s<br/>" +
57
- "Please note that the link will expire after 12 hours.<br/><br/>" +
58
- "Regards,<br/>" +
59
- "The Lowcoder Team</p>" ;
60
-
61
54
private final AssetRepository assetRepository ;
62
55
private final AssetService assetService ;
63
56
private final OrgMemberService orgMemberService ;
Original file line number Diff line number Diff line change 17
17
import org .lowcoder .domain .group .service .GroupMemberService ;
18
18
import org .lowcoder .domain .group .service .GroupService ;
19
19
import org .lowcoder .domain .organization .model .OrgMember ;
20
- import org .lowcoder .domain .organization .model .Organization ;
21
20
import org .lowcoder .domain .organization .service .OrgMemberService ;
22
21
import org .lowcoder .domain .organization .service .OrganizationService ;
23
22
import org .lowcoder .domain .user .model .*;
50
49
import java .util .stream .Collectors ;
51
50
52
51
import static com .google .common .collect .Sets .newHashSet ;
52
+ import static org .lowcoder .domain .organization .service .OrganizationServiceImpl .PASSWORD_RESET_EMAIL_TEMPLATE_DEFAULT ;
53
53
import static org .lowcoder .domain .user .model .UserDetail .ANONYMOUS_CURRENT_USER ;
54
54
import static org .lowcoder .sdk .constants .GlobalContext .CLIENT_IP ;
55
55
import static org .lowcoder .sdk .util .ExceptionUtils .ofError ;
@@ -268,7 +268,7 @@ public Mono<Boolean> lostPassword(String userEmail) {
268
268
return findByName (userEmail )
269
269
.zipWhen (user -> orgMemberService .getCurrentOrgMember (user .getId ())
270
270
.flatMap (orgMember -> organizationService .getById (orgMember .getOrgId ()))
271
- .map (organization -> organization .getCommonSettings ().get ( Organization . OrganizationCommonSettings . PASSWORD_RESET_EMAIL_TEMPLATE )))
271
+ .map (organization -> organization .getCommonSettings ().getOrDefault ( PASSWORD_RESET_EMAIL_TEMPLATE_DEFAULT , PASSWORD_RESET_EMAIL_TEMPLATE_DEFAULT )))
272
272
.flatMap (tuple -> {
273
273
User user = tuple .getT1 ();
274
274
String emailTemplate = (String )tuple .getT2 ();
You can’t perform that action at this time.
0 commit comments