test
This commit is contained in:
@@ -34,4 +34,9 @@ public class LoginController {
|
||||
return "redirect:/security/login?error";
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/logout")
|
||||
public String logout(Model modele) {
|
||||
return "security/logout";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class WebSecurityConfig{
|
||||
http.authorizeHttpRequests((requests) -> requests
|
||||
.requestMatchers("/", "/accueil").permitAll()
|
||||
.requestMatchers("/accueil", "/login", "/inscription/**", "/searchArticle", "/article/**", "/change-language").permitAll()
|
||||
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**").permitAll()
|
||||
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**", "/assets/**").permitAll()
|
||||
.requestMatchers("/profil/**", "/article/new/**", "/article/update", "/article/delete").authenticated()
|
||||
.requestMatchers("/admin").hasRole("ADMIN")
|
||||
.anyRequest().authenticated())
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
accueil.search.title = Rechercher un article par nom...
|
||||
accueil.search.cat = Toutes les catégories
|
||||
accueil.search.button = Recherche
|
||||
@@ -2,8 +2,6 @@
|
||||
<html lang="fr" th:replace="~{modele-page :: layout('Accueil - ENI-Enchères',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="assets/bootstrap-icons/bootstrap-icons.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id="container-main">
|
||||
@@ -18,11 +16,11 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<select class="form-control" name="searchCategory">
|
||||
<option value="">Toutes les catégories</option>
|
||||
<option value="" th:text="#{accueil.search.cat}"></option>
|
||||
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Recherche</button>
|
||||
<button type="submit" class="btn btn-primary"th:text="#{accueil.search.button}"></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,6 +53,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/bootstrap/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr" th:replace="~{modele-page :: layout('Modifier votre profile',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
|
||||
<html lang="fr" th:replace="~{modele-page :: layout('Modifier votre profile' , ~{::#link}, ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/fontawesome/css/all.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="container-main">
|
||||
@@ -151,5 +153,6 @@
|
||||
<button type="submit">Supprimer mon compte</button>
|
||||
</form>
|
||||
</div>
|
||||
<script src="js/bootstrap/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>[[${title}]]</title>
|
||||
<link rel="icon" th:href="@{img/favicon.ico}" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/fontawesome/css/all.css">
|
||||
<link rel="icon" th:href="@{/img/favicon.ico}" />
|
||||
<link href="/css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/assets/fontawesome/css/all.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg navbar navbar-dark bg-dark navbar-">
|
||||
<a class="navbar-brand" href="/accueil">
|
||||
<img src="img/logo.png" width="70" height="70" alt="Logo">
|
||||
<img src="/img/logo.png" width="70" height="70" alt="Logo">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@@ -97,7 +97,6 @@
|
||||
© 2024 Copyright:
|
||||
</div>
|
||||
</footer>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="js/bootstrap/bootstrap.min.js"></script>
|
||||
<script src="/js/bootstrap/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user