feat: add 'archive_on' to searchable_fields for posts and update agent bridge auth logic

This commit is contained in:
Scott Idem
2026-01-07 11:07:45 -05:00
parent ec4656eca9
commit 75b771f87c
2 changed files with 7 additions and 5 deletions

View File

@@ -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