2 Commits

Author SHA1 Message Date
5f78b87a87 corrected password url 2023-10-07 11:12:21 +02:00
5f6d71890e corrected link url 2023-10-07 10:56:42 +02:00
5 changed files with 17 additions and 3 deletions

View File

@ -8,7 +8,7 @@ plugins {
}
group = 'de.jottyfan.camporganizer'
version = '0.5.8'
version = '0.5.9'
description = """CampOrganizer2"""

View File

@ -75,6 +75,11 @@ public abstract class CommonController {
return keycloak.getUserClientUrl();
}
@ModelAttribute("keycloakPasswordUrl")
public String getKeycloakPasswordUrl() {
return keycloak.getPasswordClientUrl();
}
/**
* return true if the user has a valid keycloak session token
*

View File

@ -53,6 +53,15 @@ public class KeycloakRepository {
return String.format("%s/realms/%s/account/", url, keycloakRealm);
}
/**
* get the url of the user password client
*
* @return the url of the user password client
*/
public String getPasswordClientUrl() {
return String.format("%s%s", getUserClientUrl(), "#/security/signingin");
}
/**
* register the login in keycloak
*

View File

@ -114,7 +114,7 @@
<label for="inputAccept" class="col-sm-2 col-form-label"></label>
<div class="col-sm-10">
<button type="submit" class="btn btn-primary" onclick="progress.start()">Ok</button>
<a th:href="@{/confirmation/}" class="btn btn-secondary">Abbrechen</a>
<a th:href="@{/confirmation}" class="btn btn-secondary">Abbrechen</a>
</div>
</div>
</form>

View File

@ -136,7 +136,7 @@
</ul>
<ul class="dropdown-menu dropdown-menu-end" th:unless="${#strings.isEmpty(currentUser)}">
<li><a class="dropdown-item" th:href="@{${keycloakProfileUrl}}" target="_blank">Benutzername ändern</a></li>
<li><a class="dropdown-item" th:href="@{${keycloakProfileUrl} + '/password'}" target="_blank">Password ändern</a></li>
<li><a class="dropdown-item" th:href="@{${keycloakPasswordUrl}}" target="_blank">Password ändern</a></li>
<li><hr /></li>
<li><a class="dropdown-item" th:href="@{/logout}"><b th:inline="text">[[${currentUser}]]</b> ausloggen</a></li>
</ul>