Refactor user page layout; enhance departamento selection styling and update security configuration for user management endpoints
This commit is contained in:
parent
81465b21ac
commit
77c4a3dd69
|
|
@ -25,7 +25,7 @@ public class SecurityConfig {
|
||||||
.requestMatchers("/css/**", "/js/**", "/images/**").permitAll() // Permitir acceso a CSS, JS e imágenes
|
.requestMatchers("/css/**", "/js/**", "/images/**").permitAll() // Permitir acceso a CSS, JS e imágenes
|
||||||
.requestMatchers("/admin/**").hasRole("ADMIN")
|
.requestMatchers("/admin/**").hasRole("ADMIN")
|
||||||
.requestMatchers("/user/**").hasAnyRole("USER", "ADMIN")
|
.requestMatchers("/user/**").hasAnyRole("USER", "ADMIN")
|
||||||
.requestMatchers("/management", "/user_management", "/register","/user_list","/departamento_list","/userPage").hasRole("ADMIN")
|
.requestMatchers("/management", "/user_management","/user_list","/departamento_list","/userPage").hasRole("ADMIN")
|
||||||
.requestMatchers("/", "/login").permitAll()
|
.requestMatchers("/", "/login").permitAll()
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,15 @@ p {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
.input-group select {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
button {
|
button {
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="es" xmlns:th="http://www.thymeleaf.org">
|
|
||||||
<head>
|
|
||||||
<title>Registro</title>
|
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h2>Registro</h2>
|
|
||||||
<div class="container1">
|
|
||||||
<form th:action="@{/register}" method="post">
|
|
||||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
|
||||||
|
|
||||||
<div class="input-group">
|
|
||||||
<label>Usuario:</label>
|
|
||||||
<input type="text" name="username" required>
|
|
||||||
</div>
|
|
||||||
<div class="input-group">
|
|
||||||
<label>Contraseña:</label>
|
|
||||||
<input type="password" name="password" required>
|
|
||||||
</div>
|
|
||||||
<div class="input-group">
|
|
||||||
<label>Mail:</label>
|
|
||||||
<input type="text" name="mail" required>
|
|
||||||
</div>
|
|
||||||
<div class="input-group">
|
|
||||||
<label>Rol:</label>
|
|
||||||
<select name="role">
|
|
||||||
<option value="USER">Usuario</option>
|
|
||||||
<option value="ADMIN">Administrador</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<button type="submit">Registrar</button>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<a href="/Inventario/home">
|
|
||||||
<button class="button_salir">Volver al inicio</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -29,14 +29,16 @@
|
||||||
<option value="ADMIN">Administrador</option>
|
<option value="ADMIN">Administrador</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<label for="departamento">Departamento:</label>
|
<div class="input-group">
|
||||||
<select id="departamento" name="iddepartamento">
|
<label for="departamento">Departamento:</label>
|
||||||
<option value="">-- Sin departamento --</option>
|
<select id="departamento" name="iddepartamento">
|
||||||
<option th:each="departamento : ${departamentos}"
|
<option value="">-- Sin departamento --</option>
|
||||||
th:value="${departamento.id}"
|
<option th:each="departamento : ${departamentos}"
|
||||||
th:text="${departamento.nombre}">
|
th:value="${departamento.id}"
|
||||||
</option>
|
th:text="${departamento.nombre}">
|
||||||
</select>
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<button type="submit">Registrar</button>
|
<button type="submit">Registrar</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue