From 75b771f87c4051181f025f2c2788fdc4839200b2 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Wed, 7 Jan 2026 11:07:45 -0500 Subject: [PATCH] feat: add 'archive_on' to searchable_fields for posts and update agent bridge auth logic --- app/object_definitions/cms.py | 3 ++- app/routers/agent_bridge.py | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/object_definitions/cms.py b/app/object_definitions/cms.py index 530f27b..691a51e 100644 --- a/app/object_definitions/cms.py +++ b/app/object_definitions/cms.py @@ -49,7 +49,8 @@ cms_obj_li = { 'post_id_random', 'account_id_random', 'organization_id_random', 'person_id_random', 'user_id_random', 'title', 'content', 'type_code', 'topic_code', 'category_code', 'tags', 'location', - 'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on' + 'enable', 'hide', 'priority', 'sort', 'group', 'notes', + 'archive_on', 'created_on', 'updated_on' ], }, 'post_comment': { diff --git a/app/routers/agent_bridge.py b/app/routers/agent_bridge.py index 758c176..140395e 100644 --- a/app/routers/agent_bridge.py +++ b/app/routers/agent_bridge.py @@ -15,10 +15,10 @@ async def get_container_status( ): """ Returns diagnostic information about the container environment. - Only accessible to administrators/managers via existing hierarchy. + Only accessible to administrators/managers via existing hierarchy or bypass. """ - # Simple check for administrative access - if not getattr(account, "administrator", False) and not getattr(account, "manager", False): + # Simple check for administrative access or bypass + if account.auth_method != 'bypass' and not getattr(account, "administrator", False) and not getattr(account, "manager", False): raise HTTPException(status_code=403, detail="Administrative access required.") status_data = { @@ -41,8 +41,9 @@ async def get_latest_logs( ): """ Returns the last N lines of the application log. + Only accessible to administrators/managers via existing hierarchy or bypass. """ - if not getattr(account, "administrator", False) and not getattr(account, "manager", False): + if account.auth_method != 'bypass' and not getattr(account, "administrator", False) and not getattr(account, "manager", False): raise HTTPException(status_code=403, detail="Administrative access required.") from app.config import settings