Integrate pgroups for shipment data security

Added `pgroups` to secure and associate data with specific permission groups. Updated backend routers, database models, and API endpoints to handle authorization based on `pgroups`. Adjusted frontend components and hooks to support `pgroups` in data fetching and management workflows.
This commit is contained in:
GotthardG
2025-01-22 22:53:37 +01:00
parent 4a1852882a
commit 173e192fc4
14 changed files with 123 additions and 92 deletions

View File

@@ -3,6 +3,7 @@ from fastapi import APIRouter, Depends
from app.routers.auth import get_current_user
from app.routers.address import address_router
from app.routers.contact import contact_router
from app.routers.shipment import shipment_router
protected_router = APIRouter(
dependencies=[Depends(get_current_user)] # Applies to all routes
@@ -10,3 +11,6 @@ protected_router = APIRouter(
protected_router.include_router(address_router, prefix="/addresses", tags=["addresses"])
protected_router.include_router(contact_router, prefix="/contacts", tags=["contacts"])
protected_router.include_router(
shipment_router, prefix="/shipments", tags=["shipments"]
)