Compare commits

...

3 Commits

Author SHA1 Message Date
Vincent Guillet
6f6d033be3 Center align items in main navbar container for improved layout 2025-12-03 22:48:26 +01:00
Vincent Guillet
ff8536b448 Update SecurityConfig to require authentication for /api/app/** endpoints 2025-12-03 22:47:14 +01:00
Vincent Guillet
60593f6c11 Update base URL in index.html for proper routing in Game Over'gne app 2025-12-03 22:46:34 +01:00
3 changed files with 6 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ public class SecurityConfig {
.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll() // autoriser les preflight
.requestMatchers("/api/auth/**").permitAll()
.requestMatchers("/api/users/**").authenticated()
.requestMatchers("/api/app/**").permitAll()
.requestMatchers("/api/app/**").authenticated()
.anyRequest().permitAll()
)
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))

View File

@@ -5,7 +5,7 @@ import {LoginComponent} from './pages/auth/login/login.component';
import {ProfileComponent} from './pages/profile/profile.component';
import {guestOnlyCanActivate, guestOnlyCanMatch} from './guards/guest-only.guard';
import {adminOnlyCanActivate, adminOnlyCanMatch} from './guards/admin-only.guard';
import {authOnlyCanMatch} from './guards/auth-only.guard';
import {authOnlyCanActivate, authOnlyCanMatch} from './guards/auth-only.guard';
import {PsAdminComponent} from './pages/admin/ps-admin/ps-admin.component';
import {ProductsComponent} from './pages/products/products.component';
@@ -40,13 +40,13 @@ export const routes: Routes = [
path: 'profile',
component: ProfileComponent,
canMatch: [authOnlyCanMatch],
canActivate: [authOnlyCanMatch]
canActivate: [authOnlyCanActivate]
},
{
path: 'products',
component: ProductsComponent,
canMatch: [authOnlyCanMatch],
canActivate: [authOnlyCanMatch]
canMatch: [adminOnlyCanMatch],
canActivate: [adminOnlyCanActivate]
},
{
path: 'admin',

View File

@@ -84,6 +84,7 @@
.container {
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 8px;
}