---
suivi: 1105
date: 2026-07-30
sujet: Foncier — accès GS_HECTARE (lecture, gestion, prix)
chantier: module-foncier
type: feature
statut: poussé
hash: dd7b2f77
fichiers:
  - database/migrations/2026_07_30_220000_grant_foncier_permissions_to_gs_hectare.php
  - config/feature_permissions.php
  - routes/web.php
  - app/Http/Controllers/Admin/FoncierAlertesController.php
  - app/Http/Controllers/Admin/AdminController.php
  - tests/Feature/Foncier/FoncierAccesGsHectareTest.php
  - tests/Feature/Foncier/FoncierAccesGsHectareSourceTest.php
  - tests/Feature/Foncier/FoncierAlertesSocleTest.php
  - database/data/journal_mises_a_jour_post_2026_06_12.php
  - docs/suivi/SUIVI_1105_foncier_acces_gs_hectare.md
---

## PROMPT ENVOYÉ

SUIVI #1105 — Accès foncier pour GS_HECTARE (lecture/gestion/prix).
Exclus : secteurs, referentiels, deverrouillage. ACL dossier intacte.

## SYNTHÈSE

### Audit préalable
Mécanisme des lots #1073/#1076/#1087/#1089 : **migrations** idempotentes
(`updateOrInsert` sur `feature_permission_groups`) + catalogue dans
`config/feature_permissions.php`. GS_DSI a aussi le joker `*` (PermissionService).
GS_HECTARE était absent des `default_mappings`.

| Permission | Groupes AVANT (migrations + runtime DSI/Admin) | APRÈS |
|------------|------------------------------------------------|-------|
| foncier.lecture | GS_DSI (+ ADMIN_ERP via `*`) | + GS_HECTARE |
| foncier.gestion | GS_DSI (+ ADMIN_ERP) | + GS_HECTARE |
| foncier.prix | GS_DSI (+ ADMIN_ERP) | + GS_HECTARE |
| foncier.secteurs | GS_DSI (+ ADMIN_ERP) | inchangé |
| foncier.referentiels | GS_DSI (+ ADMIN_ERP) | inchangé |
| foncier.deverrouillage | GS_DSI + GS_DIRECTION_GENERALE | inchangé |

### Livré
- Migration `grant_foncier_permissions_to_gs_hectare` (idempotente)
- `default_mappings.GS_HECTARE` = lecture/gestion/prix
- Alertes admin : gate `foncier.referentiels` (sinon `gestion` terrain ouvrait
  `/admin/foncier-alertes` — exclus par le CDC métier #1105)

### Question ouverte (non tranché)
GS_ENVOL / GS_GEMME : aucun accès foncier dans ce lot. Le CDC prévoit que le
foncier alimente lotissement et promotion — GS_ENVOL aura probablement besoin
d’un accès un jour.

## DÉPLOIEMENT / TEST

```
git pull origin main
php artisan migrate --force
php artisan optimize:clear
php artisan view:clear
php artisan journal:sync
```

## LEÇON

Ouvrir le module à un groupe n’ouvre pas les dossiers de ses membres entre eux :
permission de module ≠ ACL par enregistrement (#1075).
