From ecd71eec9d10a44bb91d2d565e8d58189b817859 Mon Sep 17 00:00:00 2001
From: RIHTARSIC Joze <joze.rihtarsic@ext.ec.europa.eu>
Date: Fri, 28 Apr 2023 07:15:08 +0200
Subject: [PATCH] Update test data with the emails + small fixes

---
 .../search-table/search-table.component.html      |  3 ++-
 .../common/search-table/search-table.component.ts | 14 ++++++++++++--
 .../resource-document-panel.component.html        |  1 +
 .../resource-document-panel.component.ts          | 15 ++++++++++++++-
 smp-docker/compose/tomcat-mysql-smp-sml/README.md | 12 +++++++-----
 .../eulogin/init-data/userDataBase.xml            |  2 +-
 .../edelivery/smp/data/dao/ConfigurationDao.java  |  4 +++-
 .../smp/services/CredentialsAlertService.java     |  4 ++--
 .../edelivery/smp/services/mail/MailService.java  |  4 +++-
 .../alert-mail-templates/credential_expired.ftl   |  6 +++---
 .../credential_imminent_expiration.ftl            |  4 ++--
 .../alert-mail-templates/credential_suspended.ftl |  6 +++---
 .../credential_verification_failed.ftl            |  6 +++---
 .../groovy/mysql-4.1_integration_test_data.sql    |  8 ++++----
 .../groovy/oracle-4.1_integration_test_data.sql   |  8 ++++----
 smp-webapp/src/main/resources/html/index.html     |  4 ++--
 .../database-scripts/mysql5innodb-data.sql        |  7 +++----
 17 files changed, 69 insertions(+), 39 deletions(-)

diff --git a/smp-angular/src/app/common/search-table/search-table.component.html b/smp-angular/src/app/common/search-table/search-table.component.html
index 5b6b5c47e..586c92d89 100644
--- a/smp-angular/src/app/common/search-table/search-table.component.html
+++ b/smp-angular/src/app/common/search-table/search-table.component.html
@@ -32,6 +32,7 @@
     </div>
     <ngx-datatable #searchTable fxFlex id="searchTable"
                    class="expandable"
+                   [messages]="datatableMessages"
                    [rowClass]="getRowClass"
                    [rows]="rows"
                    [columns]="columnPicker.selectedColumns"
@@ -51,7 +52,7 @@
                    (page)="onPage($event)"
                    (sort)="onSort($event)"
                    [selected]="selected"
-                   [selectionType]="'multi'"
+                   [selectionType]="'single'"
                    (activate)="onActivate($event)"
                    (select)="onSelect($event)"
     >
diff --git a/smp-angular/src/app/common/search-table/search-table.component.ts b/smp-angular/src/app/common/search-table/search-table.component.ts
index 9c3d40ee4..6f498c3eb 100644
--- a/smp-angular/src/app/common/search-table/search-table.component.ts
+++ b/smp-angular/src/app/common/search-table/search-table.component.ts
@@ -29,8 +29,6 @@ export class SearchTableComponent implements OnInit {
   @ViewChild('rowActions', {static: true}) rowActions: TemplateRef<any>;
   @ViewChild('rowExpand', {static: true}) rowExpand: TemplateRef<any>;
   @ViewChild('rowIndex', {static: true}) rowIndex: TemplateRef<any>;
-
-
   @Input() additionalToolButtons: TemplateRef<any>;
   @Input() additionalRowActionButtons: TemplateRef<any>;
   @Input() searchPanel: TemplateRef<any>;
@@ -71,6 +69,18 @@ export class SearchTableComponent implements OnInit {
   forceRefresh: boolean = false;
   showSpinner: boolean = false;
   currentResult: SearchTableResult = null;
+ // override datatable messages to remove selectedMessage message
+ datatableMessages: any =  {
+  // Message to show when array is presented
+  // but contains no values
+  emptyMessage: 'No data to display',
+
+  // Footer total message
+  totalMessage: 'total',
+
+  // Footer selected message
+  selectedMessage: null
+};
 
   constructor(protected http: ExtendedHttpClient,
               protected alertService: AlertMessageService,
diff --git a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html
index 289743b03..909c2ae65 100644
--- a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html
+++ b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html
@@ -5,6 +5,7 @@
       <button id="validateResource_id" mat-raised-button
               color="primary"
               matTooltip="Validate resource"
+              [disabled]="emptyDocument"
               (click)="onDocumentValidateButtonClicked()"
       >
         <mat-icon>check_circle</mat-icon>
diff --git a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts
index 234ee4002..20c454c08 100644
--- a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts
+++ b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts
@@ -109,8 +109,13 @@ export class ResourceDocumentPanelComponent implements AfterViewInit, BeforeLeav
       this.documentForm.controls['currentResourceVersion'].setValue(value.currentResourceVersion);
       this.documentForm.controls['payloadVersion'].setValue(value.payloadVersion);
       this.documentForm.controls['payload'].setValue(value.payload);
-      this.documentForm.controls['payloadVersion'].enable();
       this.documentForm.controls['payload'].enable();
+      // the method documentVersionsExists already uses the current value to check if versions exists
+      if (!this.documentVersionsExists) {
+        this.documentForm.controls['payloadVersion'].disable();
+      } else {
+        this.documentForm.controls['payloadVersion'].enable();
+      }
     } else {
       this.documentForm.controls['name'].setValue("");
       this.documentForm.controls['payload'].setValue("");
@@ -217,6 +222,14 @@ export class ResourceDocumentPanelComponent implements AfterViewInit, BeforeLeav
     return !this._document?.allVersions ? [] : this._document?.allVersions;
   }
 
+  get emptyDocument(): boolean{
+    return !this.documentForm.controls['payload'].value
+  }
+
+  get documentVersionsExists(): boolean{
+    return this.getDocumentVersions.length > 0
+  }
+
 
   get saveButtonDisabled(): boolean {
     return !this.documentForm.dirty;
diff --git a/smp-docker/compose/tomcat-mysql-smp-sml/README.md b/smp-docker/compose/tomcat-mysql-smp-sml/README.md
index f1dbe604a..92ed632a8 100755
--- a/smp-docker/compose/tomcat-mysql-smp-sml/README.md
+++ b/smp-docker/compose/tomcat-mysql-smp-sml/README.md
@@ -37,10 +37,10 @@ Password: sml
 
 ## CAS - EULOGIN 
 url: https://localhost:7102/cas/login
-Users:
- - user/123456
- - smp/123456
- - system/123456
+Users: (For details see the CAS configuration: [userDataBase.xml](eulogin%2Finit-data%2FuserDataBase.xml)):
+- user (Peter.PARKER@dummy-mail-not-exists.eu)/123456
+- system (Bruce.BANNER@dummy-mail-not-exists.eu)/123456
+- user-02 (Tony.STARK@dummy-mail-not-exists.eu)/123456
 
  To use eulogin add the following hostname mappings (Linux: /etc/hosts, windows: C:\Windows\System32\drivers\etc\hosts
                                                                                  
@@ -49,5 +49,7 @@ Users:
 
 
 ## Mail server
-url: http://172.19.0.2:9005/monitor 
 
+Mock mail server for monitoring send alert mails. 
+url: http://localhost:9005/monitor 
+    
diff --git a/smp-docker/compose/tomcat-mysql-smp-sml/eulogin/init-data/userDataBase.xml b/smp-docker/compose/tomcat-mysql-smp-sml/eulogin/init-data/userDataBase.xml
index e0b1449ab..76c373927 100644
--- a/smp-docker/compose/tomcat-mysql-smp-sml/eulogin/init-data/userDataBase.xml
+++ b/smp-docker/compose/tomcat-mysql-smp-sml/eulogin/init-data/userDataBase.xml
@@ -29,7 +29,7 @@
 		<passwordChangeDn>uid=smp,ou=people,dc=commission,dc=europa,dc=eu</passwordChangeDn>
 		<strongPasswordHash>123456</strongPasswordHash>
 		<passwordLastChangedTime></passwordLastChangedTime>
-		<uid>smp</uid>
+		<uid>user-02</uid>
 		<cudGroups>DIGIT_SMP_ADMIN</cudGroups>
 	</user>
 
diff --git a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/dao/ConfigurationDao.java b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/dao/ConfigurationDao.java
index 896f709cc..4ff7c85e6 100644
--- a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/dao/ConfigurationDao.java
+++ b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/dao/ConfigurationDao.java
@@ -233,7 +233,7 @@ public class ConfigurationDao extends BaseDao<DBConfiguration> implements Initia
                 SMPConfigurationInitializer configurationInitializer = new SMPConfigurationInitializer(memEManager, environmentProperties);
                 newProperties = configurationInitializer.getDatabaseProperties();
                 newProperties.setLastUpdate(OffsetDateTime.now());
-            }            // first update deprecated values
+            }
 
             Map<String, Object> resultProperties;
             try {
@@ -282,6 +282,8 @@ public class ConfigurationDao extends BaseDao<DBConfiguration> implements Initia
 
     protected void setInitializedTime(OffsetDateTime dateTime) {
         initiateDate = dateTime;
+        // update property listeners for the first time
+        updatePropertyListeners();
     }
 
 
diff --git a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/CredentialsAlertService.java b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/CredentialsAlertService.java
index f35f4dc6f..b02d5dc68 100644
--- a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/CredentialsAlertService.java
+++ b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/CredentialsAlertService.java
@@ -319,8 +319,8 @@ public class CredentialsAlertService {
             mailService.sendMail(props, mailFrom, alert.getMailTo());
             updateAlertStatus(alert, AlertStatusEnum.SUCCESS, null);
         } catch (Throwable exc) {
-            LOG.error("Can not send mail (empty mail) for alert [{}]! Error [{}]",
-                    alert, ExceptionUtils.getRootCauseMessage(exc));
+            LOG.error("Can not send mail [{}] for alert [{}]! Error [{}]",
+                    mailTo,  alert, ExceptionUtils.getRootCauseMessage(exc));
             updateAlertStatus(alert, AlertStatusEnum.FAILED, ExceptionUtils.getRootCauseMessage(exc));
         }
 
diff --git a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/mail/MailService.java b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/mail/MailService.java
index aa620ecac..8965eaafa 100644
--- a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/mail/MailService.java
+++ b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/services/mail/MailService.java
@@ -67,9 +67,11 @@ public class MailService {
             helper.setText(html, true);
             helper.setSubject(model.getSubject());
             helper.setFrom(from);
+            LOG.info("Send mail to : [{}:{}]",javaMailSender.getHost(),javaMailSender.getPort());
+
             javaMailSender.send(message);
         } catch (IOException | MessagingException | TemplateException | MailException e) {
-            LOG.error("Exception while sending mail from[{}] to[{}]", from, to, e);
+            LOG.error("Exception while sending mail from [{}] to [{}]", from, to, e);
             throw new SMPRuntimeException(ErrorCode.MAIL_SUBMISSION_ERROR, e, ExceptionUtils.getRootCauseMessage(e));
         }
     }
diff --git a/smp-server-library/src/main/resources/alert-mail-templates/credential_expired.ftl b/smp-server-library/src/main/resources/alert-mail-templates/credential_expired.ftl
index 4bc555416..5240d3f2c 100644
--- a/smp-server-library/src/main/resources/alert-mail-templates/credential_expired.ftl
+++ b/smp-server-library/src/main/resources/alert-mail-templates/credential_expired.ftl
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>eDelivery SMP</title>
+<title>DomiSMP</title>
 </head>
 <body style="margin:0; padding:0; background-color: #f1f1f1;">
 <center>
@@ -41,7 +41,7 @@
 
                             <!-- TITLE -->
                             <tr>
-                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">eDelivery SMP<br/></td>
+                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">DomiSMP<br/></td>
                             </tr>
                             <!-- / TITLE -->
 
@@ -112,4 +112,4 @@
   </table>
 </center>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/smp-server-library/src/main/resources/alert-mail-templates/credential_imminent_expiration.ftl b/smp-server-library/src/main/resources/alert-mail-templates/credential_imminent_expiration.ftl
index 8a18f1fac..16783fddd 100644
--- a/smp-server-library/src/main/resources/alert-mail-templates/credential_imminent_expiration.ftl
+++ b/smp-server-library/src/main/resources/alert-mail-templates/credential_imminent_expiration.ftl
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>eDelivery SMP</title>
+<title>DomiSMP</title>
 </head>
 <body style="margin:0; padding:0; background-color: #f1f1f1;">
 <center>
@@ -41,7 +41,7 @@
 
                             <!-- TITLE -->
                             <tr>
-                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">eDelivery SMP<br/></td>
+                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">DomiSMP<br/></td>
                             </tr>
                             <!-- / TITLE -->
 
diff --git a/smp-server-library/src/main/resources/alert-mail-templates/credential_suspended.ftl b/smp-server-library/src/main/resources/alert-mail-templates/credential_suspended.ftl
index 2847ec059..514c228bd 100644
--- a/smp-server-library/src/main/resources/alert-mail-templates/credential_suspended.ftl
+++ b/smp-server-library/src/main/resources/alert-mail-templates/credential_suspended.ftl
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>eDelivery SMP</title>
+<title>DomiSMP</title>
 </head>
 <body style="margin:0; padding:0; background-color: #f1f1f1;">
 <center>
@@ -41,7 +41,7 @@
                             
                             <!-- TITLE -->
                             <tr>
-                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">eDelivery SMP<br/></td>
+                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">DomiSMP<br/></td>
                             </tr>
                             <!-- / TITLE --> 
                             
@@ -115,4 +115,4 @@
   </table>
 </center>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/smp-server-library/src/main/resources/alert-mail-templates/credential_verification_failed.ftl b/smp-server-library/src/main/resources/alert-mail-templates/credential_verification_failed.ftl
index 7e2b43928..08935d815 100644
--- a/smp-server-library/src/main/resources/alert-mail-templates/credential_verification_failed.ftl
+++ b/smp-server-library/src/main/resources/alert-mail-templates/credential_verification_failed.ftl
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>eDelivery SMP</title>
+<title>DomiSMP</title>
 </head>
 <body style="margin:0; padding:0; background-color: #f1f1f1;">
 <center>
@@ -41,7 +41,7 @@
                             
                             <!-- TITLE -->
                             <tr>
-                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">eDelivery SMP<br/></td>
+                              <td valign="top" align="left" style=" font-size: 30px; font-family: Arial, Helvetica, sans-serif; color: #000;">DomiSMP<br/></td>
                             </tr>
                             <!-- / TITLE --> 
                             
@@ -114,4 +114,4 @@
   </table>
 </center>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/smp-soapui-tests/groovy/mysql-4.1_integration_test_data.sql b/smp-soapui-tests/groovy/mysql-4.1_integration_test_data.sql
index b560056ed..817d10fbb 100644
--- a/smp-soapui-tests/groovy/mysql-4.1_integration_test_data.sql
+++ b/smp-soapui-tests/groovy/mysql-4.1_integration_test_data.sql
@@ -1,11 +1,11 @@
-insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, CREATED_ON, LAST_UPDATED_ON) values
-(1, 'system', 1, 'SYSTEM_ADMIN',  NOW(),  NOW());
+insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, EMAIL, CREATED_ON, LAST_UPDATED_ON) values
+(1, 'system', 1, 'SYSTEM_ADMIN', 'system@mail-example.local',  NOW(),  NOW());
 insert into SMP_CREDENTIAL (ID, FK_USER_ID, CREDENTIAL_ACTIVE, CREDENTIAL_NAME, CREDENTIAL_VALUE, CREDENTIAL_TYPE, CREDENTIAL_TARGET, CREATED_ON, LAST_UPDATED_ON) values
 (2, 1, 1, 'system', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'USERNAME_PASSWORD','UI',  NOW(),  NOW()),
 (3, 1, 1, 'pat_system', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'ACCESS_TOKEN', 'REST_API',  NOW(),  NOW());
 
-insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE,  CREATED_ON, LAST_UPDATED_ON) values
-(2, 'user', 1, 'USER',  NOW(),  NOW());
+insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, EMAIL, CREATED_ON, LAST_UPDATED_ON) values
+(2, 'user', 1, 'USER', 'user@mail-example.local',  NOW(),  NOW());
 insert into SMP_CREDENTIAL (ID, FK_USER_ID, CREDENTIAL_ACTIVE, CREDENTIAL_NAME, CREDENTIAL_VALUE, CREDENTIAL_TYPE, CREDENTIAL_TARGET, CREATED_ON, LAST_UPDATED_ON) values
 (4, 2, 1, 'user', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'USERNAME_PASSWORD','UI',  NOW(),  NOW()),
 (5, 2, 1, 'user', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'ACCESS_TOKEN', 'REST_API',  NOW(),  NOW()),
diff --git a/smp-soapui-tests/groovy/oracle-4.1_integration_test_data.sql b/smp-soapui-tests/groovy/oracle-4.1_integration_test_data.sql
index 85be9de71..f4112b2b7 100644
--- a/smp-soapui-tests/groovy/oracle-4.1_integration_test_data.sql
+++ b/smp-soapui-tests/groovy/oracle-4.1_integration_test_data.sql
@@ -40,15 +40,15 @@ DELETE FROM SMP_DOMAIN_AUD;
 DELETE FROM SMP_REV_INFO;
 set define off;
 
-insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, CREATED_ON, LAST_UPDATED_ON) values
-(1, 'system', 1, 'SYSTEM_ADMIN',  sysdate,  sysdate);
+insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, EMAIL, CREATED_ON, LAST_UPDATED_ON) values
+(1, 'system', 1, 'SYSTEM_ADMIN', 'system@mail-example.local', sysdate,  sysdate);
 insert into SMP_CREDENTIAL (ID, FK_USER_ID, CREDENTIAL_ACTIVE, CREDENTIAL_NAME, CREDENTIAL_VALUE, CREDENTIAL_TYPE, CREDENTIAL_TARGET, CREATED_ON, LAST_UPDATED_ON) values
 (2, 1, 1, 'system', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'USERNAME_PASSWORD','UI',  sysdate,  sysdate);
 insert into SMP_CREDENTIAL (ID, FK_USER_ID, CREDENTIAL_ACTIVE, CREDENTIAL_NAME, CREDENTIAL_VALUE, CREDENTIAL_TYPE, CREDENTIAL_TARGET, CREATED_ON, LAST_UPDATED_ON) values
 (3, 1, 1, 'pat_system', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'ACCESS_TOKEN', 'REST_API',  sysdate,  sysdate);
 
-insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE,  CREATED_ON, LAST_UPDATED_ON) values
-(2, 'user', 1, 'USER',  sysdate,  sysdate);
+insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, EMAIL, CREATED_ON, LAST_UPDATED_ON) values
+(2, 'user', 1, 'USER',  'user@mail-example.local',  sysdate,  sysdate);
 insert into SMP_CREDENTIAL (ID, FK_USER_ID, CREDENTIAL_ACTIVE, CREDENTIAL_NAME, CREDENTIAL_VALUE, CREDENTIAL_TYPE, CREDENTIAL_TARGET, CREATED_ON, LAST_UPDATED_ON) values
 (4, 2, 1, 'user', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'USERNAME_PASSWORD','UI',  sysdate,  sysdate);
 insert into SMP_CREDENTIAL (ID, FK_USER_ID, CREDENTIAL_ACTIVE, CREDENTIAL_NAME, CREDENTIAL_VALUE, CREDENTIAL_TYPE, CREDENTIAL_TARGET, CREATED_ON, LAST_UPDATED_ON) values
diff --git a/smp-webapp/src/main/resources/html/index.html b/smp-webapp/src/main/resources/html/index.html
index f6dd59ac8..a1bf19155 100644
--- a/smp-webapp/src/main/resources/html/index.html
+++ b/smp-webapp/src/main/resources/html/index.html
@@ -14,7 +14,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>SMP</title>
+    <title>DomiSMP</title>
     <link rel="icon" type="image/x-ico" href="favicon.ico">
     <style type="text/css">
     body { font-family: Arial, Helvetica, sans-serif; }
@@ -26,6 +26,6 @@
     <h2>Version: ${project.version}</h2>
     <h6>Build timestamp: ${buildtimestamp}</h6>
     <h6>Specification: <a href="http://docs.oasis-open.org/bdxr/bdx-smp/v1.0/bdx-smp-v1.0.html" target="_blank">http://docs.oasis-open.org/bdxr/bdx-smp/v1.0/bdx-smp-v1.0.html</a></h6>
-    <h6>UI: <a href="ui/index.html" target="_blank">eDelivery SMP</a></h6>
+    <h6>UI: <a href="ui/index.html" target="_blank">DomiSMP</a></h6>
   </body>
 </html>
diff --git a/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb-data.sql b/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb-data.sql
index 8e5224b67..2233655cc 100644
--- a/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb-data.sql
+++ b/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb-data.sql
@@ -1,12 +1,11 @@
-insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, CREATED_ON, LAST_UPDATED_ON) values
-(1, 'system', 1, 'SYSTEM_ADMIN',  NOW(),  NOW()),
-(2, 'user', 1, 'USER',  NOW(),  NOW());
+insert into SMP_USER (ID, USERNAME, ACTIVE, APPLICATION_ROLE, EMAIL, CREATED_ON, LAST_UPDATED_ON) values
+(1, 'system', 1, 'SYSTEM_ADMIN','system@mail-example.local',  NOW(),  NOW()),
+(2, 'user', 1, 'USER',  'user@mail-example.local', NOW(),  NOW());
 
 insert into SMP_CREDENTIAL (ID, FK_USER_ID, CREDENTIAL_ACTIVE, CREDENTIAL_NAME, CREDENTIAL_VALUE, CREDENTIAL_TYPE, CREDENTIAL_TARGET, CREATED_ON, LAST_UPDATED_ON) values
 (1, 1, 1, 'system', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'USERNAME_PASSWORD','UI',  NOW(),  NOW()),
 (2, 2, 1, 'user', '$2a$06$FDmjewn/do3C219uysNm9.XG8mIn.ubHnMydAzC8lsv61HsRpOR36', 'USERNAME_PASSWORD','UI',  NOW(),  NOW());
 
-
 insert into SMP_DOMAIN (ID, DOMAIN_CODE, VISIBILITY, SML_SUBDOMAIN, SML_SMP_ID, SIGNATURE_KEY_ALIAS, SML_CLIENT_KEY_ALIAS, SML_CLIENT_CERT_AUTH,SML_REGISTERED, CREATED_ON, LAST_UPDATED_ON) values
 (1, 'testdomain','PUBLIC', 'test-domain', 'DOMI-SMP-001','sample_key','smp_domain_01',1,1, NOW(),  NOW());
 insert into SMP_GROUP (ID, FK_DOMAIN_ID, NAME, VISIBILITY, CREATED_ON, LAST_UPDATED_ON) values
-- 
GitLab