feat(ai): add tenant-safe hierarchical expense learning
This commit is contained in:
@@ -26,6 +26,7 @@ class CurrentUserContext:
|
||||
is_admin: bool
|
||||
tenant_id: str = "default"
|
||||
department_name: str = ""
|
||||
department_id: str = ""
|
||||
cost_center: str = ""
|
||||
position: str = ""
|
||||
grade: str = ""
|
||||
@@ -74,6 +75,7 @@ def _authenticate_bearer_user(db: Session, authorization: str | None) -> Current
|
||||
is_admin=user.is_admin,
|
||||
tenant_id=user.tenant_id,
|
||||
department_name=user.department,
|
||||
department_id=user.department_id or "",
|
||||
cost_center=user.cost_center,
|
||||
position=user.position,
|
||||
grade=user.grade,
|
||||
|
||||
Reference in New Issue
Block a user