feat: added admin secure

This commit is contained in:
Corentin Huet 2025-03-31 15:44:32 +02:00
parent 7d1f60cfae
commit fa3b38ac98
6 changed files with 87 additions and 5 deletions

View file

@ -42,3 +42,7 @@ SENTRY_LARAVEL_DSN=
# Matomo
MATOMO_SITE_ID=
## ADMIN SECURE
LDC_WEB_API_KEY=
LDC_WEB_CIDR_MANUAL_ALLOWED_LIST=

View file

@ -15,6 +15,17 @@ npm install && npm run prod
```
## Production
Put every min in PROD :
```php
php artisan schedule:run
```
## Available Commands
```
ldcweb:admin-secure-sync
```
## Back-Office
Création de compte

View file

@ -19,6 +19,7 @@
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"ldc/ldccrmv2client": "^3.0",
"ldc/web-admin-secure-laravel": "^1.0",
"maatwebsite/excel": "^3.1",
"mews/purifier": "^3.3",
"sentry/sentry-laravel": "^3.7",

72
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a69f03618c9de0831b0a66e7d42359be",
"content-hash": "f125859babe93c1c3b34a7e9b30cd499",
"packages": [
{
"name": "asm89/stack-cors",
@ -2089,6 +2089,70 @@
"Laravel"
]
},
{
"name": "ldc/web-admin-secure-laravel",
"version": "1.0.1",
"source": {
"type": "git",
"url": "git@lab.s-web.fr:ldc-web/projets/ldc-web-admin-secure-laravel.git",
"reference": "c538f5d349b119ac64cb62b33e6368bef6be90bc"
},
"dist": {
"type": "zip",
"url": "https://lab.s-web.fr/api/v4/projects/20/packages/composer/archives/ldc/web-admin-secure-laravel.zip?sha=c538f5d349b119ac64cb62b33e6368bef6be90bc",
"reference": "c538f5d349b119ac64cb62b33e6368bef6be90bc",
"shasum": ""
},
"require": {
"illuminate/support": "~8|~9",
"laravel/framework": "~8|~9",
"php": "~7.3|7.4|~8"
},
"require-dev": {
"orchestra/testbench": "^6.24",
"phpunit/php-code-coverage": "^9.2",
"phpunit/phpunit": "~9.0",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"LDC\\WebAdminSecureLaravel\\AdminSecureServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"LDC\\WebAdminSecureLaravel\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"LDC\\WebAdminSecureLaravel\\Tests\\": "tests"
}
},
"scripts": {
"test": [
"vendor/bin/phpunit"
],
"post-autoload-dump": [
"@php ./vendor/bin/testbench package:discover --ansi"
]
},
"license": [
"MIT"
],
"authors": [
{
"name": "Vincent BRIDIER",
"email": "vincent.bridier@ldc.fr",
"homepage": "https://www.ldc.fr"
}
],
"description": "Restrict access to LDC Network"
},
{
"name": "league/commonmark",
"version": "1.6.7",
@ -11143,12 +11207,12 @@
],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^7.3"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
"platform-dev": {},
"plugin-api-version": "2.6.0"
}

View file

@ -27,6 +27,8 @@ data:
CRM_PASSWORD: "${APP_CRM_PASSWORD}"
SENTRY_LARAVEL_DSN: "${APP_SENTRY_LARAVEL_DSN}"
MATOMO_SITE_ID: "${APP_MATOMO_SITE_ID}"
LDC_WEB_API_KEY: "${APP_LDC_WEB_API_KEY}"
LDC_WEB_CIDR_MANUAL_ALLOWED_LIST: "${APP_LDC_WEB_CIDR_MANUAL_ALLOWED_LIST}"
---
apiVersion: v1
kind: PersistentVolumeClaim

View file

@ -32,7 +32,7 @@ Route::name('auth.')
Route::prefix('bo')
->name('bo.')
->middleware(['auth', 'is-admin'])
->middleware(['auth', 'is-admin', 'admin-secure'])
->group(function () {
Route::get('/', [DashboardController::class, 'index'])->name('dashboard');
Route::match(['get', 'put'], '/content/{key}', [ContentController::class, 'manage'])