feat: enhance access layer governance and visibility checks
- Added new documentation references for access layer governance in CLAUDE.md, including multi-tenancy and endpoint audit guidelines. - Updated ACCESS_LAYER_AND_GOVERNANCE_PLAN.md to include cursor and heuristic checks for access layer compliance. - Enhanced ACCESS_LAYER_ENDPOINT_AUDIT.md to clarify endpoint visibility and governance requirements, including exemptions for certain routers. - Introduced library_content_visible_to_profile function in club_tenancy.py to streamline visibility checks for library content. - Updated exercise progression graphs router to utilize the new visibility function, improving access control. - Bumped application version to 0.8.27 and updated changelog to reflect these changes.
This commit is contained in:
1 parent
5aee9c52fc
commit
abee6171df
11 files changed
+192
-17
No files matched your search
@@ -13,8 +13,8 @@ from db import get_db, get_cursor, r2d
|
||||
from tenant_context import TenantContext, get_tenant_context, library_content_visibility_sql
|
||||
from club_tenancy import (
|
||||
assert_valid_governance_visibility,
|
||||
exercise_visible_to_profile,
|
||||
is_platform_admin,
|
||||
library_content_visible_to_profile,
|
||||
)
|
||||
|
||||
from routers.training_planning import _has_planning_role
|
||||
@@ -106,7 +106,7 @@ def _assert_graph_readable(cur, row: dict, profile_id: int, role: str) -> None:
|
||||
cr = row.get("created_by")
|
||||
if cr is not None:
|
||||
cr = int(cr)
|
||||
if not exercise_visible_to_profile(cur, profile_id, vis, cid, cr, role):
|
||||
if not library_content_visible_to_profile(cur, profile_id, vis, cid, cr, role):
|
||||
raise HTTPException(status_code=403, detail="Keine Berechtigung für diesen Progressionsgraph")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user