mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
10 Commits
forgot-pas
...
20.142
Author | SHA1 | Date | |
---|---|---|---|
|
be60d67377 | ||
|
806131c21c | ||
|
64202ee9d5 | ||
|
2b92022b5b | ||
|
9a56a052e8 | ||
|
1f38c24bbd | ||
|
0bcb96e51e | ||
|
df522a38b9 | ||
|
1458ef3311 | ||
|
2bdca1a4f5 |
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
10
pom.xml
10
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
<dependency.alfresco-messaging-repo.version>1.2.20</dependency.alfresco-messaging-repo.version>
|
||||
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
||||
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
||||
<dependency.alfresco-transform-service.version>2.1.0-A5</dependency.alfresco-transform-service.version>
|
||||
<dependency.alfresco-transform-core.version>3.1.0-A5</dependency.alfresco-transform-core.version>
|
||||
<dependency.alfresco-transform-service.version>2.1.0-A6</dependency.alfresco-transform-service.version>
|
||||
<dependency.alfresco-transform-core.version>3.1.0-A8</dependency.alfresco-transform-core.version>
|
||||
<dependency.alfresco-greenmail.version>6.5</dependency.alfresco-greenmail.version>
|
||||
<dependency.acs-event-model.version>0.0.18</dependency.acs-event-model.version>
|
||||
|
||||
<dependency.spring.version>5.3.25</dependency.spring.version>
|
||||
<dependency.spring.version>5.3.26</dependency.spring.version>
|
||||
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
||||
<dependency.jackson.version>2.15.0-rc1</dependency.jackson.version>
|
||||
<dependency.cxf.version>3.5.5</dependency.cxf.version>
|
||||
@@ -150,7 +150,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||
<tag>HEAD</tag>
|
||||
<tag>20.142</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.140-SNAPSHOT</version>
|
||||
<version>20.142</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -504,21 +504,6 @@ public class ResetPasswordServiceImpl implements ResetPasswordService
|
||||
return UrlUtil.replaceShareUrlPlaceholder(url, sysAdminParams);
|
||||
}
|
||||
|
||||
private String getRepoBaseUrl(String url, String propName)
|
||||
{
|
||||
if (url == null)
|
||||
{
|
||||
LOGGER.warn("The url for the property [" + propName + "] is not configured.");
|
||||
return "";
|
||||
}
|
||||
|
||||
if (url.endsWith("/"))
|
||||
{
|
||||
url = url.substring(0, url.length() - 1);
|
||||
}
|
||||
return UrlUtil.replaceRepoBaseUrlPlaceholder(url, sysAdminParams);
|
||||
}
|
||||
|
||||
protected String getResetPasswordEmailTemplate(ClientApp clientApp)
|
||||
{
|
||||
return clientApp.getProperty("requestResetPasswordTemplatePath");
|
||||
@@ -537,16 +522,7 @@ public class ResetPasswordServiceImpl implements ResetPasswordService
|
||||
StringBuilder sb = new StringBuilder(100);
|
||||
|
||||
String pageUrl = clientApp.getProperty("resetPasswordPageUrl");
|
||||
|
||||
if(!StringUtils.isEmpty(clientApp.getProperty("workspaceUrl")))
|
||||
{
|
||||
String workspaceUrlPlaceholder = clientApp.getProperty("workspaceUrl");
|
||||
String workSpaceUrl = getRepoBaseUrl(workspaceUrlPlaceholder,"");
|
||||
sb.append(UrlUtil.replaceWorkSpaceUrlPlaceholder(pageUrl,workSpaceUrl));
|
||||
LOGGER.warn("Client Name is " + clientApp.getName() + " The url used is " + sb.toString());
|
||||
|
||||
}
|
||||
else if(StringUtils.isEmpty(pageUrl))
|
||||
if (StringUtils.isEmpty(pageUrl))
|
||||
{
|
||||
sb.append(UrlUtil.getShareUrl(sysAdminParams));
|
||||
|
||||
@@ -559,7 +535,7 @@ public class ResetPasswordServiceImpl implements ResetPasswordService
|
||||
sb.append(getUrl(pageUrl, ""));
|
||||
}
|
||||
|
||||
sb.append("?key=").append(key)
|
||||
sb.append("?key=").append(key)
|
||||
.append("&id=").append(BPMEngineRegistry.createGlobalId(ActivitiConstants.ENGINE_ID, id));
|
||||
|
||||
return sb.toString();
|
||||
|
@@ -41,12 +41,6 @@ public class UrlUtil
|
||||
public static final Pattern PATTERN = Pattern.compile("\\$\\{shareUrl\\}");
|
||||
// ${alfrescoUrl} placeholder
|
||||
public static final Pattern REPO_PATTERN = Pattern.compile("\\$\\{alfrescoUrl\\}");
|
||||
|
||||
public static final Pattern REPOBASE_PATTERN = Pattern.compile("\\$\\{repoBaseUrl\\}");
|
||||
|
||||
public static final Pattern WORKSPACE_PATTERN = Pattern.compile("\\$\\{workspaceUrl\\}");
|
||||
|
||||
|
||||
/**
|
||||
* Builds up the Url to Alfresco based on the settings in the
|
||||
* {@link SysAdminParams}.
|
||||
@@ -152,68 +146,4 @@ public class UrlUtil
|
||||
url.append(context);
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds up the Url to Adw based on the settings in the
|
||||
* {@link SysAdminParams}.
|
||||
* @return Adw Url such as https://col.ab.or.ate/#/
|
||||
* or http://localhost:8081/#/
|
||||
*/
|
||||
public static String getWorkspaceUrl(SysAdminParams sysAdminParams)
|
||||
{
|
||||
return buildWorkspaceUrl(
|
||||
sysAdminParams.getAlfrescoProtocol(),
|
||||
sysAdminParams.getAlfrescoHost(),
|
||||
sysAdminParams.getAlfrescoPort());
|
||||
}
|
||||
|
||||
protected static String buildWorkspaceUrl(String workSpaceProtocol, String workspaceHost, int workspacePort) {
|
||||
StringBuilder workspaceUrl = new StringBuilder();
|
||||
workspaceUrl.append(workSpaceProtocol);
|
||||
workspaceUrl.append("://");
|
||||
workspaceUrl.append(workspaceHost);
|
||||
if ("http".equals(workSpaceProtocol) && workspacePort == 80)
|
||||
{
|
||||
// Not needed
|
||||
}
|
||||
else if ("https".equals(workSpaceProtocol) && workspacePort == 443)
|
||||
{
|
||||
// Not needed
|
||||
}
|
||||
else
|
||||
{
|
||||
workspaceUrl.append(':');
|
||||
workspaceUrl.append(workspacePort);
|
||||
}
|
||||
|
||||
return workspaceUrl.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the repo base url placeholder, namely {@literal ${repoBaseUrl}}, with <b>workspace</b> url.
|
||||
*
|
||||
* @param value the string value which contains the repoBase url placeholder
|
||||
* @param sysAdminParams the {@code SysAdminParams} object
|
||||
* @return if the given {@code value} contains share url placeholder,
|
||||
* the placeholder is replaced with share url; otherwise, the given {@code value} is simply returned
|
||||
*/
|
||||
|
||||
public static String replaceRepoBaseUrlPlaceholder(String value, SysAdminParams sysAdminParams)
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
return REPOBASE_PATTERN.matcher(value).replaceAll(getWorkspaceUrl(sysAdminParams));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public static String replaceWorkSpaceUrlPlaceholder(String pageUrl,String workspaceUrl)
|
||||
{
|
||||
if (pageUrl != null)
|
||||
{
|
||||
return WORKSPACE_PATTERN.matcher(pageUrl).replaceAll(workspaceUrl);
|
||||
}
|
||||
return pageUrl;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -20,16 +20,6 @@ repo.client-app.share.resetPasswordPageUrl=${shareUrl}/page/reset-password
|
||||
repo.client-app.share.confirmResetPasswordTemplatePath=
|
||||
|
||||
### Digital workspace template configurations
|
||||
#repo.client-app.workspace.inviteModeratedTemplatePath=
|
||||
|
||||
repo.client-app.workspace.workspaceUrl=${repoBaseUrl}/workspace
|
||||
|
||||
#repo.client-app.workspace.templateAssetsUrl=${workspaceUrl}/images
|
||||
|
||||
repo.client-app.workspace.templateAssetsUrl=alfresco/templates/reset-password-email-templates/images
|
||||
# reset password request email template path
|
||||
repo.client-app.workspace.requestResetPasswordTemplatePath=alfresco/templates/reset-password-email-templates/forgot-password-email-template.ftl
|
||||
# reset password UI page url
|
||||
repo.client-app.workspace.resetPasswordPageUrl=${workspaceUrl}/reset-password/
|
||||
# reset password confirmation email template path
|
||||
repo.client-app.workspace.confirmResetPasswordTemplatePath=
|
||||
repo.client-app.workspace.inviteModeratedTemplatePath=
|
||||
repo.client-app.workspace.workspaceUrl=workspace
|
||||
repo.client-app.workspace.templateAssetsUrl=${alfrescoUrl}/images
|
||||
|
@@ -1,428 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
td {
|
||||
font-family: 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: none;
|
||||
width: 100% ! important;
|
||||
height: 100% !important;
|
||||
color: #727174;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #727174;
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0c79bf;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.linkone {
|
||||
color: #0c79bf;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.appleLinks a {
|
||||
color: #0c79bf;
|
||||
}
|
||||
|
||||
.appleLinksWhite a {
|
||||
color: #0c79bf;
|
||||
}
|
||||
|
||||
.force-full-width {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.body-padding {
|
||||
padding: 0 75px
|
||||
}
|
||||
|
||||
.force-width-80 {
|
||||
width: 80% !important;
|
||||
}
|
||||
|
||||
p {
|
||||
Margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.button {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-family: sans-serif;
|
||||
font-weight: 400;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
.button a {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 600px;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
mso-table-lspace: 0pt;
|
||||
mso-table-rspace: 0pt;
|
||||
}
|
||||
|
||||
#outlook a {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ReadMsgBody {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ExternalClass {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.backgroundTable {
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
table td {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.ExternalClass * {
|
||||
line-height: 115%;
|
||||
}
|
||||
|
||||
.ExternalClass {
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
/*]]>*/
|
||||
</style>
|
||||
<style type="text/css" media="screen">
|
||||
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { {
|
||||
@-ms-viewport {
|
||||
width: 320px;
|
||||
}
|
||||
@viewport {
|
||||
width: 320px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style type="text/css" media="screen">
|
||||
@media screen {
|
||||
* {
|
||||
font-family: 'Helvetica Neue', 'Arial', 'sans-serif' !important;
|
||||
}
|
||||
|
||||
.w280 {
|
||||
width: 280px !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style type="text/css" media="only screen and (max-width: 480px)">
|
||||
@media only screen and (max-width: 480px) {
|
||||
.full {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table[class*="w320"] {
|
||||
width: 320px !important;
|
||||
}
|
||||
|
||||
td[class*="w320"] {
|
||||
width: 280px !important;
|
||||
padding-left: 20px !important;
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
|
||||
img[class*="w320"] {
|
||||
width: 250px !important;
|
||||
height: 67px !important;
|
||||
}
|
||||
|
||||
td[class*="mobile-spacing"] {
|
||||
padding-top: 10px !important;
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
*[class*="mobile-hide"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
*[class*="mobile-br"] {
|
||||
font-size: 8px !important;
|
||||
}
|
||||
|
||||
*[class*="mobile-brh"] {
|
||||
font-size: 1px !important;
|
||||
}
|
||||
|
||||
td[class*="mobile-w20"] {
|
||||
width: 20px !important;
|
||||
}
|
||||
|
||||
img[class*="mobile-w20"] {
|
||||
width: 20px !important;
|
||||
}
|
||||
|
||||
td[class*="mobile-center"] {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
table[class*="w100p"] {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
td[class*="activate-now"] {
|
||||
padding-right: 0 !important;
|
||||
padding-top: 20px !important;
|
||||
}
|
||||
|
||||
td[class*="mobile-resize"] {
|
||||
font-size: 22px !important;
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body offset="0" class="body" style="padding:0; margin:0; display:block; background:#f3f4f4; -webkit-text-size-adjust:none; " bgcolor="#EEEEEE">
|
||||
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
||||
<tr>
|
||||
<td align="center" valign="top" style="background-color:#f3f4f4; " width="100%">
|
||||
<table cellspacing="0" cellpadding="0" width="600" class="w320">
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
|
||||
<!--Snippet Block-->
|
||||
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="10" width="100%" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<div style="display:none;font-size:1px;color:#333333;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">
|
||||
-
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Header Block-->
|
||||
<table bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0" align="center" width="100%"
|
||||
style="border-left:solid 1px #dedee4; border-right:solid 1px #dedee4; border-bottom:solid 1px #dedee4; border-top:solid 1px #dedee4; width:100%!important; min-width:100%;">
|
||||
<tr style="width:100%;">
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="10" align="center" width="100%">
|
||||
<tr>
|
||||
<td align="left" valign="middle"><a style="color: #ffffff; text-decoration: none;" href=
|
||||
"http://go.alfresco.com/a0100K050L0000KZjI2d00U" target="_blank"
|
||||
><span style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; color: #727174;"><img
|
||||
style="border:none; display:block; border-collapse:collapse; outline:none; text-decoration:none;"
|
||||
src="${template_assets_url}/hyland_logo.png" border="0"
|
||||
alt="Alfresco" width="122" height="38"></span></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td align="right" bgcolor="#FFFFFF">
|
||||
<table border="0" cellspacing="0" cellpadding="10" align="center" width="100%">
|
||||
<tr>
|
||||
<td align="right" valign="middle"><span
|
||||
style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; font-weight:200; color: #727174;">Digital Workspace</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Break-->
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td height="10">
|
||||
<div class="mobile-br"> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Body Block 1-->
|
||||
<!--Banner Block-->
|
||||
<table cellspacing="0" cellpadding="0" width="100%" style="border-left:solid 1px #dedee4; border-right:solid 1px #dedee4; ">
|
||||
<tr>
|
||||
<td style="border-collapse:collapse; ">
|
||||
<table cellspacing="0" cellpadding="0" width="100%" style="background-color:#0c79bf; border:none; ">
|
||||
<tr>
|
||||
<td style="border-collapse:collapse; ">
|
||||
<div class="mktEditable" id="Banner Image 1"><span
|
||||
style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; color: #ffffff;"><img
|
||||
src="${template_assets_url}/adw_logo.png" alt="Alfresco Products" style="width:100%; border:none;
|
||||
display:block; border-collapse:collapse; outline:none; text-decoration:none;"></span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--Copy-->
|
||||
<table cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF"
|
||||
style="border-left:solid 1px #dedee4; border-right:solid 1px #dedee4; border-bottom:solid 1px #dedee4; " width="100%">
|
||||
<tr align="center">
|
||||
<td style="background-color:#ffffff; " align="center">
|
||||
<table class="force-width-80" cellspacing="0" cellpadding="12" align="center" bgcolor="#FFFFFF" width="80%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<!--Headline Text-->
|
||||
<div class="mktEditable" id="Headline Text 1" align="left" style="vertical-align:middle; "><span
|
||||
style="color: #727174; margin: 0px; font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 600; text-align: left; text-decoration: none; vertical-align:
|
||||
middle;"><p>${message("templates.reset-password-email.ftl.title")}</p></span></div>
|
||||
<div class="mktEditable" id="Body Text 1" align="left">
|
||||
<span style="color:#727174; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:18px;font-weight:400; text-align:left; text-decoration:none; -webkit-text-size-adjust:none;">
|
||||
<p>${message("templates.reset-password-email.ftl.detail")}</p>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Break-->
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td height="5">
|
||||
<div class="mobile-br"> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Button-->
|
||||
<table style="margin:0 auto; " cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center; margin:0 auto; ">
|
||||
<div><!--[if mso]>
|
||||
<v:rect xmlns:v="urn:schemas-microsoft-com:vml"
|
||||
xmlns:w="urn:schemas-microsoft-com:office:word"
|
||||
style="height:45px;v-text-anchor:middle;width:220px;" stroke="f"
|
||||
fillcolor="#47AA2">
|
||||
<w:anchorlock/>
|
||||
<center>
|
||||
<![endif]-->
|
||||
<div class="mktEditable" id="Button Text"><a href="${reset_password_url}" style="background-color:#47aa42; color:#ffffff; display:inline-block; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:18px; font-weight:400; line-height:45px; text-align:center; text-decoration:none; width:220px;
|
||||
-webkit-text-size-adjust:none;">${message("templates.reset-password-email.ftl.reset_password_button")}</a></div>
|
||||
<span style="color:#727174; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:12px;font-weight:400; text-align:left; text-decoration:none; -webkit-text-size-adjust:none;">
|
||||
<p>${message("templates.reset-password-email.ftl.ignore_message")}</p>
|
||||
<span style="color:#727174; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:12px;font-weight:400; text-align:left; text-decoration:none; -webkit-text-size-adjust:none;">
|
||||
<hr>
|
||||
<p>${message("templates.reset-password-email.ftl.having_trouble_clicking_button")}</p>
|
||||
<p><a href="${reset_password_url}">${reset_password_url}</a></p>
|
||||
</span>
|
||||
<!--[if mso]>
|
||||
</center>
|
||||
</v:rect>
|
||||
<![endif]--></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Break-->
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td height="5">
|
||||
<div class="mobile-br"> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Break-->
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td height="10">
|
||||
<div class="mobile-br"> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Footer Block-->
|
||||
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a style="color: #0c79bf; text-decoration: underline;" href="http://www.alfresco.com/company/contact"
|
||||
target="_blank"><span
|
||||
style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 10px; color: #0c79bf;">${message("templates.generic-email.ftl.contact_us")}</span></a>
|
||||
<span style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial,
|
||||
sans-serif; font-size: 10px; color: #b3b3b8;">© ${date?string["yyyy"]} Alfresco Software, Inc.
|
||||
${message("templates.generic-email.ftl.copy_right")}</span><br>
|
||||
<span style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 10px; color: #b3b3b8;">Bridge Ave, The Place Maidenhead SL6 1AF United Kingdom</span><br>
|
||||
<span style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 10px; color: #b3b3b8;">1825 S Grant St, Suite 900 San Mateo, CA 94402 USA</span><br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--Break-->
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td height="10">
|
||||
<div class="mobile-br"> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--Litmus Tracking-->
|
||||
<table style="display: none;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 0px; display: none; overflow: hidden; max-height: 0px;">{{my.Litmus_Code}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.0 KiB |
@@ -91,7 +91,6 @@ public class ResetPasswordServiceImplTest
|
||||
|
||||
private static TestPerson testPerson;
|
||||
private static EmailUtil emailUtil;
|
||||
private static TestPerson testPersonForWorkspace;
|
||||
|
||||
@BeforeClass
|
||||
public static void initStaticData() throws Exception
|
||||
@@ -115,18 +114,9 @@ public class ResetPasswordServiceImplTest
|
||||
.setPassword("password")
|
||||
.setEmail(userName + "@example.com");
|
||||
|
||||
String userNameForWorkspace = "shane.doe" + System.currentTimeMillis();
|
||||
testPersonForWorkspace = new TestPerson()
|
||||
.setUserName(userNameForWorkspace)
|
||||
.setFirstName("Shane")
|
||||
.setLastName("doe")
|
||||
.setPassword("password")
|
||||
.setEmail(userNameForWorkspace + "@example.com");
|
||||
|
||||
transactionHelper.doInTransaction((RetryingTransactionCallback<Void>) () ->
|
||||
{
|
||||
createUser(testPerson);
|
||||
createUser(testPersonForWorkspace);
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -504,84 +494,4 @@ public class ResetPasswordServiceImplTest
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testResetPasswordForClientWorkspace() throws Exception
|
||||
{
|
||||
// Try the credential before change of password
|
||||
authenticateUser(testPersonForWorkspace.userName, testPersonForWorkspace.password);
|
||||
|
||||
// Make sure to run as system
|
||||
AuthenticationUtil.clearCurrentSecurityContext();
|
||||
AuthenticationUtil.setRunAsUserSystem();
|
||||
|
||||
// Request password reset
|
||||
resetPasswordService.requestReset(testPersonForWorkspace.userName, "workspace");
|
||||
assertEquals("A reset password email should have been sent.", 1, emailUtil.getSentCount());
|
||||
// Check the email
|
||||
MimeMessage msg = emailUtil.getLastEmail();
|
||||
assertNotNull("There should be an email.", msg);
|
||||
assertEquals("Should've been only one email recipient.", 1, msg.getAllRecipients().length);
|
||||
// Check the recipient is the person who requested the reset password
|
||||
assertEquals(testPersonForWorkspace.email, msg.getAllRecipients()[0].toString());
|
||||
//Check the sender is what we set as default
|
||||
assertEquals(DEFAULT_SENDER, msg.getFrom()[0].toString());
|
||||
// There should be a subject
|
||||
assertNotNull("There should be a subject.", msg.getSubject());
|
||||
// Check the default email subject - (check that we are sending the right email)
|
||||
String emailSubjectKey = getDeclaredField(SendResetPasswordEmailDelegate.class, "EMAIL_SUBJECT_KEY");
|
||||
assertNotNull(emailSubjectKey);
|
||||
assertEquals(msg.getSubject(), I18NUtil.getMessage(emailSubjectKey));
|
||||
|
||||
// Check the reset password url.
|
||||
String resetPasswordUrl = (String) emailUtil.getLastEmailTemplateModelValue("reset_password_url");
|
||||
assertNotNull("Wrong email is sent.", resetPasswordUrl);
|
||||
// Get the workflow id and key
|
||||
Pair<String, String> pair = getWorkflowIdAndKeyFromUrl(resetPasswordUrl);
|
||||
assertNotNull("Workflow Id can't be null.", pair.getFirst());
|
||||
assertNotNull("Workflow Key can't be null.", pair.getSecond());
|
||||
|
||||
emailUtil.reset();
|
||||
// Now that we have got the email, try to reset the password
|
||||
ResetPasswordDetails passwordDetails = new ResetPasswordDetails()
|
||||
.setUserId(testPersonForWorkspace.userName)
|
||||
.setPassword("newPassword")
|
||||
.setWorkflowId(pair.getFirst())
|
||||
.setWorkflowKey(pair.getSecond());
|
||||
|
||||
resetPasswordService.initiateResetPassword(passwordDetails);
|
||||
assertEquals("A reset password confirmation email should have been sent.", 1, emailUtil.getSentCount());
|
||||
// Check the email
|
||||
msg = emailUtil.getLastEmail();
|
||||
assertNotNull("There should be an email.", msg);
|
||||
assertEquals("Should've been only one email recipient.", 1, msg.getAllRecipients().length);
|
||||
// Check the recipient is the person who requested the reset password
|
||||
assertEquals(testPersonForWorkspace.email, msg.getAllRecipients()[0].toString());
|
||||
// Check the sender is what we set as default
|
||||
assertEquals(DEFAULT_SENDER, msg.getFrom()[0].toString());
|
||||
// There should be a subject
|
||||
assertNotNull("There should be a subject.", msg.getSubject());
|
||||
// Check the default email subject - (check that we are sending the right email)
|
||||
emailSubjectKey = getDeclaredField(SendResetPasswordConfirmationEmailDelegate.class, "EMAIL_SUBJECT_KEY");
|
||||
assertNotNull(emailSubjectKey);
|
||||
assertEquals(msg.getSubject(), I18NUtil.getMessage(emailSubjectKey));
|
||||
|
||||
// Try the old credential
|
||||
TestHelper.assertThrows(() -> authenticateUser(testPersonForWorkspace.userName, testPersonForWorkspace.password),
|
||||
AuthenticationException.class,
|
||||
"As the user changed her password, the authentication should have failed.");
|
||||
|
||||
// Try the new credential
|
||||
authenticateUser(testPersonForWorkspace.userName, "newPassword");
|
||||
|
||||
// Make sure to run as system
|
||||
AuthenticationUtil.clearCurrentSecurityContext();
|
||||
AuthenticationUtil.setRunAsUserSystem();
|
||||
emailUtil.reset();
|
||||
// Try reset again with the used workflow
|
||||
TestHelper.assertThrows(() -> resetPasswordService.initiateResetPassword(passwordDetails),
|
||||
InvalidResetPasswordWorkflowException.class,
|
||||
"The workflow instance is not active (it has already been used).");
|
||||
assertEquals("No email should have been sent.", 0, emailUtil.getSentCount());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user