Compare commits
2 Commits
f21c7584bd
...
5f78b87a87
Author | SHA1 | Date | |
---|---|---|---|
5f78b87a87 | |||
5f6d71890e |
@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'de.jottyfan.camporganizer'
|
||||
version = '0.5.8'
|
||||
version = '0.5.9'
|
||||
|
||||
description = """CampOrganizer2"""
|
||||
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user