finalized keycloak registration
This commit is contained in:
		@@ -80,7 +80,8 @@ public class IndexGateway {
 | 
			
		||||
			.leftJoin(T_PERSON).on(T_PERSON.FK_PROFILE.eq(T_PROFILE.PK))
 | 
			
		||||
			.leftJoin(REGISTRATOR).on(REGISTRATOR.PK.eq(T_PERSON.FK_REGISTRATOR))
 | 
			
		||||
			.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
 | 
			
		||||
			.where(T_PROFILE.USERNAME.eq(username));
 | 
			
		||||
			.where(T_PROFILE.USERNAME.eq(username))
 | 
			
		||||
			.and(T_PERSON.PK.isNotNull());
 | 
			
		||||
		// @formatter:on
 | 
			
		||||
		LOGGER.debug(sql.toString());
 | 
			
		||||
		List<BookingBean> list = new ArrayList<>();
 | 
			
		||||
 
 | 
			
		||||
@@ -96,6 +96,10 @@ div {
 | 
			
		||||
	/* 60 px is the current height of the headline; TODO: calculate it */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.acc_over {
 | 
			
		||||
	background-image: linear-gradient(to bottom right, #ccc, #aaa) !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.acc_true {
 | 
			
		||||
	background-image: linear-gradient(to bottom right, #cfc, #afa) !important;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -26,10 +26,11 @@
 | 
			
		||||
					$(e).css("background", "orange");
 | 
			
		||||
				}
 | 
			
		||||
			</script>
 | 
			
		||||
			<div class="accordion" id="acc">
 | 
			
		||||
			<div class="alert alert-primary" th:if="${mybookings.size() < 1}">Es wurden noch keine Anmeldungen für eine Freizeit hinterlegt.</div>
 | 
			
		||||
			<div class="accordion" id="acc" th:if="${mybookings.size() > 0}">
 | 
			
		||||
				<div class="accordion-item" th:each="b : ${mybookings}">
 | 
			
		||||
					<h2 class="accordion-header" th:id="'acc-head-' + ${b.pk}" th:if="${b.pk}">
 | 
			
		||||
						<button th:class="'accordion-button collapsed acc_' + ${b.accept}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}" aria-expanded="true"
 | 
			
		||||
						<button th:class="'accordion-button collapsed acc_' + ${b.isOver ? 'over' : b.accept}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}" aria-expanded="true"
 | 
			
		||||
							th:aria-controls="'#acc-body-' + ${b.pk}">
 | 
			
		||||
							<i class="fas fa-check framed framed-green" th:if="${b.accept}"></i> <i class="fas fa-ban framed framed-red" th:if="${b.accept} == false"></i> <i
 | 
			
		||||
								class="fas fa-question framed framed-orange" th:if="${b.accept} == null"></i> <span
 | 
			
		||||
@@ -37,7 +38,7 @@
 | 
			
		||||
								th:text="${b.locationName}"></span>
 | 
			
		||||
						</button>
 | 
			
		||||
					</h2>
 | 
			
		||||
					<div th:id="'acc-body-' + ${b.pk}" class="accordion-collapse collapse" th:aria-labelledby="'acc-head-' + ${b.pk}" th:if="${b.pk}">
 | 
			
		||||
					<div th:id="'acc-body-' + ${b.pk}" class="accordion-collapse collapse" th:aria-labelledby="'acc-head-' + ${b.pk}">
 | 
			
		||||
						<div class="accordion-body">
 | 
			
		||||
							<div class="card">
 | 
			
		||||
								<div class="card-header">Freizeitdaten</div>
 | 
			
		||||
@@ -124,7 +125,7 @@
 | 
			
		||||
													<input type="submit" class="btn btn-primary" value="Änderungen übernehmen" />
 | 
			
		||||
												</div>
 | 
			
		||||
												<div class="col-sm-2">
 | 
			
		||||
													<a th:href="@{/registration/cancel/{id}(id=${b.pk})}" class="btn btn-outline-danger">stornieren</a>
 | 
			
		||||
													<a th:href="@{/registration/cancel/{id}(id=${b.pk})}" class="btn btn-outline-danger" th:if="${!b.isOver}">stornieren</a>
 | 
			
		||||
												</div>
 | 
			
		||||
											</div>
 | 
			
		||||
										</div>
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ public class TestKeycloakRepository {
 | 
			
		||||
	@Test
 | 
			
		||||
	public void testRegister() {
 | 
			
		||||
		KeycloakRepository repository = new KeycloakRepository();
 | 
			
		||||
		UserRepresentation user = repository.getUserRepresentation("Hans", "Dampf", "hans@dampf.org");
 | 
			
		||||
		UserRepresentation user = repository.getUserRepresentation("Hans", "Dampf", "hans", "password", "hans@dampf.org");
 | 
			
		||||
		UsersResource resource = repository.getUsersResource("http://localhost:8080", "ow", "owadmin", "password", "biblecamp");
 | 
			
		||||
		assertTrue(repository.register(resource, user));
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user