Skip to content

Commit fc5799b

Browse files
cbeyer42cesmarvin
authored andcommitted
Merge branch 'release/v1.9.0-1'
2 parents 1df6772 + 8864c12 commit fc5799b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2466
-748
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [v1.9.0-1] - 2022-11-14
10+
### Changed
11+
- Add Backend Endpoint for the User Import via CSV-File (#69)
12+
- For more information see [docs](docs/operations/csv-import_en.md)
13+
914
## [v1.8.1-1] - 2022-10-20
1015
### Fixed
1116
- in User Managment an empty Password will not suffice for lowercase and minimum lenght of 9 or less (#67)

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN set -x \
88
FROM registry.cloudogu.com/official/java:8u302-3
99

1010
LABEL NAME="official/usermgt" \
11-
VERSION="1.8.1-1" \
11+
VERSION="1.9.0-1" \
1212
maintainer="[email protected]"
1313

1414
# mark as webapp for nginx

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Set these to the desired values
22
ARTIFACT_ID=usermgt
3-
VERSION=1.8.1-1
3+
VERSION=1.9.0-1
44
# overwrite ADDITIONAL_LDFLAGS to disable static compilation
55
# this should fix https://github.com/golang/go/issues/13470
66
ADDITIONAL_LDFLAGS=""
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<application-configuration>
3+
<sender-mail>[email protected]</sender-mail>
4+
<admin-group>cesAdmin</admin-group>
5+
<manager-group>cesManager</manager-group>
6+
<import-mail-subject>Ihr neuer CES Account</import-mail-subject>
7+
<import-mail-content>Willkommen zum Cloudogu Ecosystem!
8+
Dies ist ihr Benutzeraccount
9+
Benutzername = %s
10+
Passwort = %s
11+
Bei der ersten Anmeldung müssen sie ihr Passwort ändern"</import-mail-content>
12+
</application-configuration>

app/env/data/i18n/de.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<root>
3+
<added-successful>erfolgreich angelegt(%s, %s, %s, %s, %s)</added-successful>
4+
<could-not-send-mail>Mail konnte nicht versendet werden</could-not-send-mail>
5+
<csv-with-lines-read-successful>CSV-Datei mit %d Zeilen erfolgreich eingelesen.</csv-with-lines-read-successful>
6+
<empty-displayname>DisplayName ist leer</empty-displayname>
7+
<empty-mail>Mail ist leer</empty-mail>
8+
<empty-surname>Nachname ist leer</empty-surname>
9+
<empty-username>Benutzername ist leer</empty-username>
10+
<ending-protocol>---Beende Protokoll---</ending-protocol>
11+
<error-on-creating-user>Fehler in Zeile %d. Benutzer nicht angelegt. Fehlermeldung: </error-on-creating-user>
12+
<group-does-not-exist>%s existiert nicht</group-does-not-exist>
13+
<incomplete-line>Zeile %d ist unvollständig</incomplete-line>
14+
<starting-protocol>---Beginne Protokoll---</starting-protocol>
15+
<unique-mail-error>Die Mail für diesen Nutzer wird bereits verwendet.</unique-mail-error>
16+
<unknown-error>Ein unbekannter Fehler ist bei dem Anlegen des Nutzers aufgetreten.</unknown-error>
17+
<user-added>%s zugeordnet</user-added>
18+
<user-already-exists>konnte nicht angelegt werden(Nutzer existiert bereits)</user-already-exists>
19+
<user-part-of-group-already>Nutzer ist bereits Teil von %s</user-part-of-group-already>
20+
</root>

app/env/data/i18n/en.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<root>
3+
<added-successful>successfully added(%s, %s, %s, %s, %s)</added-successful>
4+
<could-not-send-mail>Mail could not been send</could-not-send-mail>
5+
<csv-with-lines-read-successful>CSV-File with %d Lines successfully added.</csv-with-lines-read-successful>
6+
<empty-displayname>DisplayName is empty</empty-displayname>
7+
<empty-mail>Mail is empty</empty-mail>
8+
<empty-surname>Surname is empty</empty-surname>
9+
<empty-username>Username is empty</empty-username>
10+
<ending-protocol>---Ending Protocol---</ending-protocol>
11+
<error-on-creating-user>Error in Line %d. User not added. Error message: </error-on-creating-user>
12+
<group-does-not-exist>%s doesn't exist</group-does-not-exist>
13+
<incomplete-line>Line %d is incomplete</incomplete-line>
14+
<starting-protocol>---Starting Protocol---</starting-protocol>
15+
<unique-mail-error>The Mail of this user is already in use.</unique-mail-error>
16+
<unknown-error>An unknown error occurred during user creation.</unknown-error>
17+
<user-added>%s added</user-added>
18+
<user-already-exists>could not been added(User already exists)</user-already-exists>
19+
<user-part-of-group-already>User already member of %s</user-part-of-group-already>
20+
</root>

app/pom.xml

+9-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
</scm>
2727

2828
<dependencies>
29+
<!-- https://mvnrepository.com/artifact/javax.mail/mail -->
30+
<dependency>
31+
<groupId>javax.mail</groupId>
32+
<artifactId>mail</artifactId>
33+
<version>1.5.0-b01</version>
34+
</dependency>
2935

3036
<dependency>
3137
<groupId>javax.servlet</groupId>
@@ -293,11 +299,11 @@
293299
<plugin>
294300
<groupId>org.codehaus.mojo</groupId>
295301
<artifactId>animal-sniffer-maven-plugin</artifactId>
296-
<version>1.9</version>
302+
<version>1.22</version>
297303
<configuration>
298304
<signature>
299305
<groupId>org.codehaus.mojo.signature</groupId>
300-
<artifactId>java17</artifactId>
306+
<artifactId>java18</artifactId>
301307
<version>1.0</version>
302308
</signature>
303309
</configuration>
@@ -696,7 +702,7 @@
696702
<properties>
697703
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
698704
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
699-
<project.build.javaLevel>1.7</project.build.javaLevel>
705+
<project.build.javaLevel>1.8</project.build.javaLevel>
700706
<powermock.version>1.5.3</powermock.version>
701707
<slf4j.version>1.7.7</slf4j.version>
702708
<resteasy.version>3.0.10.Final</resteasy.version>

app/src/main/java/de/triology/universeadm/BootstrapContextListener.java

+47-61
Original file line numberDiff line numberDiff line change
@@ -26,83 +26,69 @@
2626
*/
2727

2828

29-
3029
package de.triology.universeadm;
3130

3231
//~--- non-JDK imports --------------------------------------------------------
3332

3433
import com.google.common.collect.ImmutableList;
3534
import com.google.inject.Module;
36-
35+
import de.triology.universeadm.configuration.ApplicationConfiguration;
36+
import de.triology.universeadm.configuration.Language;
37+
import de.triology.universeadm.configuration.I18nConfiguration;
3738
import org.apache.shiro.guice.web.ShiroWebModule;
38-
39-
import org.jboss.resteasy.plugins.guice
40-
.GuiceResteasyBootstrapServletContextListener;
41-
42-
//~--- JDK imports ------------------------------------------------------------
43-
44-
import java.util.List;
45-
46-
import javax.servlet.ServletContext;
39+
import org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener;
4740
import org.slf4j.Logger;
4841
import org.slf4j.LoggerFactory;
4942

43+
import javax.servlet.ServletContext;
44+
import java.util.List;
45+
5046
/**
51-
*
5247
* @author Sebastian Sdorra <[email protected]>
5348
*/
5449
public class BootstrapContextListener
55-
extends GuiceResteasyBootstrapServletContextListener
56-
{
50+
extends GuiceResteasyBootstrapServletContextListener {
5751

58-
private static final Logger logger = LoggerFactory.getLogger(BootstrapContextListener.class);
59-
60-
/**
61-
* Method description
62-
*
63-
*
64-
* @param context
65-
*
66-
* @return
67-
*/
68-
@Override
69-
protected List<? extends Module> getModules(ServletContext context)
70-
{
71-
LDAPConfiguration ldapConfiguration =
72-
BaseDirectory.getConfiguration("ldap.xml", LDAPConfiguration.class);
52+
private static final Logger logger = LoggerFactory.getLogger(BootstrapContextListener.class);
7353

74-
List<? extends Module> modules;
54+
/**
55+
* Method description
56+
*
57+
* @param context
58+
* @return
59+
*/
60+
@Override
61+
protected List<? extends Module> getModules(ServletContext context) {
62+
LDAPConfiguration ldapConfiguration = BaseDirectory.getConfiguration("ldap.xml", LDAPConfiguration.class);
63+
ApplicationConfiguration applicationConfiguration = BaseDirectory.getConfiguration("application-configuration.xml", ApplicationConfiguration.class);
64+
I18nConfiguration i18nConfiguration = new I18nConfiguration(Language.en, Language.de);
7565

76-
if (ldapConfiguration.isDisabled())
77-
{
78-
logger.warn("ldap is disable load error module");
79-
modules = ImmutableList.of(new LDAPDisabledModule());
80-
}
81-
else
82-
{
83-
logger.info("load injection modules");
84-
85-
Module securityModule;
86-
if (Stage.get() == Stage.PRODUCTION)
87-
{
88-
logger.info("load cas security module for production stage");
89-
securityModule = new CasSecurityModule(context);
90-
}
91-
else
92-
{
93-
logger.info("load development security module for development stage");
94-
securityModule = new DevelopmentSecurityModule(context);
95-
}
96-
97-
//J-
98-
modules = ImmutableList.of(
99-
ShiroWebModule.guiceFilterModule(),
100-
new MainModule(ldapConfiguration),
101-
securityModule
102-
);
103-
//J+
104-
}
66+
List<? extends Module> modules;
10567

106-
return modules;
107-
}
68+
if (ldapConfiguration.isDisabled()) {
69+
logger.warn("ldap is disable load error module");
70+
modules = ImmutableList.of(new LDAPDisabledModule());
71+
} else {
72+
logger.info("load injection modules");
73+
74+
Module securityModule;
75+
if (Stage.get() == Stage.PRODUCTION) {
76+
logger.info("load cas security module for production stage");
77+
securityModule = new CasSecurityModule(context);
78+
} else {
79+
logger.info("load development security module for development stage");
80+
securityModule = new DevelopmentSecurityModule(context);
81+
}
82+
83+
//J-
84+
modules = ImmutableList.of(
85+
ShiroWebModule.guiceFilterModule(),
86+
new MainModule(ldapConfiguration, applicationConfiguration, i18nConfiguration),
87+
securityModule
88+
);
89+
//J+
90+
}
91+
92+
return modules;
93+
}
10894
}

0 commit comments

Comments
 (0)