fix: merge main branch and renumber migration 027→037

Resolve 3 merge conflicts and renumber the automation_hooks migration
to follow main's migration chain (036_add_document_translation_fields).

Conflicts resolved:
- app/api/__init__.py: add automation_router alongside main's new routers
- app/utils/settings_service.py: add automation_hooks_enabled alongside compliance_enabled
- tests/conftest.py: add AutomationHook alongside AuditLog/ComplianceTemplate imports

Migration renumbered:
- 027_add_automation_hooks → 037_add_automation_hooks
- down_revision: 026_add_scheduled_jobs → 036_add_document_translation_fields

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-16 22:40:15 +00:00
parent 6a83d51d88
commit 204000aabc
318 changed files with 317516 additions and 2858 deletions
+28 -29
View File
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% block title %}Credential Audit - DocuElevate{% endblock %}
{% block title %}{{ _("credentials.page_title") }}{% endblock %}
{% block content %}
<div class="container mx-auto px-4 py-8">
@@ -8,11 +8,10 @@
<div class="mb-8">
<div class="flex items-center gap-3 mb-2">
<i class="fas fa-key text-yellow-500 text-2xl" aria-hidden="true"></i>
<h1 class="text-3xl font-bold">Credential Audit</h1>
<h1 class="text-3xl font-bold">{{ _("credentials.title") }}</h1>
</div>
<p class="text-gray-600">
Overview of all sensitive credentials used by DocuElevate. No secret values are shown here — only
whether each credential is configured and where it comes from.
{{ _("credentials.subtitle") }}
</p>
</div>
@@ -24,7 +23,7 @@
</span>
<div>
<div class="text-2xl font-bold text-gray-800">{{ total }}</div>
<div class="text-sm text-gray-500">Total Credentials</div>
<div class="text-sm text-gray-500">{{ _("credentials.total_credentials") }}</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-5 flex items-center gap-4">
@@ -33,7 +32,7 @@
</span>
<div>
<div class="text-2xl font-bold text-green-700">{{ configured_count }}</div>
<div class="text-sm text-gray-500">Configured</div>
<div class="text-sm text-gray-500">{{ _("credentials.configured") }}</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-5 flex items-center gap-4">
@@ -42,32 +41,32 @@
</span>
<div>
<div class="text-2xl font-bold text-gray-600">{{ unconfigured_count }}</div>
<div class="text-sm text-gray-500">Not Configured</div>
<div class="text-sm text-gray-500">{{ _("credentials.not_configured") }}</div>
</div>
</div>
</div>
<!-- Legend -->
<div class="bg-blue-50 border-l-4 border-blue-500 text-blue-800 p-4 mb-6 rounded-r-md">
<p class="font-semibold mb-2"><i class="fas fa-circle-info mr-1" aria-hidden="true"></i> Legend</p>
<p class="font-semibold mb-2"><i class="fas fa-circle-info mr-1" aria-hidden="true"></i> {{ _("credentials.legend_title") }}</p>
<div class="flex flex-wrap gap-4 text-sm">
<span>
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800 mr-1">DB</span>
Value stored in the database (encrypted at rest; overrides environment variable)
{{ _("credentials.legend_db") }}
</span>
<span>
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800 mr-1">ENV</span>
Value from environment variable or <code>.env</code> file
{{ _("credentials.legend_env_before") }}<code>.env</code>{{ _("credentials.legend_env_after") }}
</span>
<span>
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-700 mr-1">
<i class="fas fa-circle-exclamation mr-0.5 text-xs"></i> Missing
<i class="fas fa-circle-exclamation mr-0.5 text-xs"></i> {{ _("credentials.status_missing") }}
</span>
Credential not set — integration will not work
{{ _("credentials.legend_missing") }}
</span>
<span>
<span class="text-orange-500 mr-1"><i class="fas fa-rotate"></i></span>
Restart required when this credential is rotated
{{ _("credentials.legend_restart") }}
</span>
</div>
</div>
@@ -79,29 +78,29 @@
<div class="bg-gray-100 px-6 py-3 border-b border-gray-200 flex items-center justify-between">
<h2 class="text-lg font-semibold text-gray-800">{{ category }}</h2>
<span class="text-sm text-gray-500">
{{ creds | selectattr('configured') | list | length }} / {{ creds | length }} configured
{{ creds | selectattr('configured') | list | length }} / {{ creds | length }} {{ _("credentials.configured") }}
</span>
</div>
<!-- Credentials Table -->
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200" aria-label="Credentials for {{ category }}">
<table class="min-w-full divide-y divide-gray-200" aria-label="{{ _('credentials.table_for') ~ ' ' ~ category }}">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-56">
Credential
{{ _("credentials.col_credential") }}
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Description
{{ _("common.description") }}
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-32">
Status
{{ _("common.status") }}
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-24">
Source
{{ _("credentials.col_source") }}
</th>
<th scope="col" class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider w-20">
Action
{{ _("credentials.col_action") }}
</th>
</tr>
</thead>
@@ -114,7 +113,7 @@
<div class="flex items-center gap-1">
<code class="text-sm font-mono text-gray-800">{{ cred.key }}</code>
{% if cred.restart_required %}
<span title="Restart required after rotating this credential">
<span title="{{ _('credentials.restart_title') }}">
<i class="fas fa-rotate text-orange-400 text-xs"></i>
</span>
{% endif %}
@@ -130,11 +129,11 @@
<td class="px-6 py-4 whitespace-nowrap">
{% if cred.configured %}
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-green-100 text-green-800">
<i class="fas fa-check mr-1" aria-hidden="true"></i> Configured
<i class="fas fa-check mr-1" aria-hidden="true"></i> {{ _("credentials.configured") }}
</span>
{% else %}
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-red-100 text-red-700">
<i class="fas fa-circle-exclamation mr-1" aria-hidden="true"></i> Missing
<i class="fas fa-circle-exclamation mr-1" aria-hidden="true"></i> {{ _("credentials.status_missing") }}
</span>
{% endif %}
</td>
@@ -142,11 +141,11 @@
<!-- Source badge -->
<td class="px-6 py-4 whitespace-nowrap">
{% if cred.source == 'db' %}
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800" title="Stored in database (encrypted)">
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800" title="{{ _('credentials.source_db_title') }}">
<i class="fas fa-database mr-1 text-xs" aria-hidden="true"></i> DB
</span>
{% elif cred.source == 'env' %}
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800" title="From environment variable">
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800" title="{{ _('credentials.source_env_title') }}">
<i class="fas fa-terminal mr-1 text-xs" aria-hidden="true"></i> ENV
</span>
{% else %}
@@ -157,8 +156,8 @@
<!-- Quick-edit link -->
<td class="px-6 py-4 whitespace-nowrap text-center">
<a href="/settings#{{ cred.key }}"
title="Edit in Settings"
aria-label="Edit {{ cred.key }}"
title="{{ _('credentials.edit_in_settings') }}"
aria-label="{{ _('common.edit') ~ ' ' ~ cred.key }}"
class="inline-flex items-center justify-center w-7 h-7 rounded text-gray-400 hover:text-blue-600 hover:bg-blue-50 transition-colors"
>
<i class="fas fa-pen-to-square text-sm" aria-hidden="true"></i>
@@ -178,13 +177,13 @@
<a href="/settings"
class="inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 text-sm font-medium"
>
<i class="fas fa-cog" aria-hidden="true"></i> Manage Settings
<i class="fas fa-cog" aria-hidden="true"></i> {{ _("credentials.manage_settings") }}
</a>
<a href="/api/settings/credentials"
target="_blank"
class="inline-flex items-center gap-2 px-4 py-2 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50 text-sm font-medium"
>
<i class="fas fa-code" aria-hidden="true"></i> Raw JSON (API)
<i class="fas fa-code" aria-hidden="true"></i> {{ _("credentials.raw_json") }}
</a>
</div>