Skip to content
Snippets Groups Projects
Commit e2e450a3 authored by migudel's avatar migudel :speech_balloon:
Browse files

SPA + new hotel + modificación de hotel admin

parent bc54b3dc
Branches
Tags
1 merge request!26Revert "Funciona register"
...@@ -19,6 +19,7 @@ FROM nginx:alpine AS production ...@@ -19,6 +19,7 @@ FROM nginx:alpine AS production
# Copiar los archivos de construcción generados en la etapa anterior a la carpeta de Nginx # Copiar los archivos de construcción generados en la etapa anterior a la carpeta de Nginx
COPY --from=build /app/dist/app/browser /usr/share/nginx/html COPY --from=build /app/dist/app/browser /usr/share/nginx/html
COPY --from=build-step /app/*.conf /etc/nginx/sites-available/default
# Exponer el puerto 80 para Nginx # Exponer el puerto 80 para Nginx
EXPOSE 80 EXPOSE 80
......
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
\ No newline at end of file
...@@ -91,6 +91,13 @@ export class NavigationComponent implements OnInit { ...@@ -91,6 +91,13 @@ export class NavigationComponent implements OnInit {
allowRoles: ['HOTEL_ADMIN'], allowRoles: ['HOTEL_ADMIN'],
link: '/me/hotels', link: '/me/hotels',
}, },
{
id: genId(),
icon: 'fiber_new',
text: 'Registrar hotel',
allowRoles: ['HOTEL_ADMIN'],
link: '/hotels/register',
},
{ {
id: genId(), id: genId(),
icon: 'settings', icon: 'settings',
......
...@@ -28,8 +28,8 @@ public class SecurityConfig { ...@@ -28,8 +28,8 @@ public class SecurityConfig {
// Permitir OPTIONS sin autenticación // Permitir OPTIONS sin autenticación
.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll() .requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
// Acceso restringido a usuarios y administradores // Acceso restringido a usuarios y administradores
.requestMatchers("users", "users/**") .requestMatchers("users", "users/**").hasAnyRole(
.hasAnyRole(UserRol.ADMIN.toString(), UserRol.CLIENT.toString()) UserRol.CLIENT.toString(), UserRol.HOTEL_ADMIN.toString(), UserRol.ADMIN.toString())
// Acceso restringido a gestores de hoteles y administradores // Acceso restringido a gestores de hoteles y administradores
.requestMatchers(HttpMethod.GET, "hotels", "hotels/*").hasAnyRole( .requestMatchers(HttpMethod.GET, "hotels", "hotels/*").hasAnyRole(
UserRol.CLIENT.toString(), UserRol.HOTEL_ADMIN.toString(), UserRol.ADMIN.toString()) UserRol.CLIENT.toString(), UserRol.HOTEL_ADMIN.toString(), UserRol.ADMIN.toString())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment