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("/admin/**").hasRole("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()
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,15 @@ p {
|
|||
border-radius: 4px;
|
||||
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 {
|
||||
|
||||
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,6 +29,7 @@
|
|||
<option value="ADMIN">Administrador</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label for="departamento">Departamento:</label>
|
||||
<select id="departamento" name="iddepartamento">
|
||||
<option value="">-- Sin departamento --</option>
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
th:text="${departamento.nombre}">
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit">Registrar</button>
|
||||
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue