mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-15 11:00:47 +02:00
feat(policies): backend-driven policy enforcement (frontend) (#6598)
## Summary Adds the **Policies** feature (proprietary, behind the `POLICIES_ENABLED` flag): backend-driven enforcement that runs a fixed tool pipeline on documents, docked in the right tool sidebar alongside Tools. ## Highlights - **Policy catalog** — 5 categories; **Security** is wired (redact PII + sanitize), the others are marked "Coming soon". - **Backend as source of truth** — policies persist via the Policies engine (`/api/v1/policies`), one policy per category, with a local cache + offline fallback. - **Auto-run** — enabled policies run on every uploaded file: dispatch → poll → import outputs into the workspace. - **Security redact config** — PII preset dropdown + custom word/regex entry + advanced options; tool params map to the backend endpoint fields. - **Activity feed** with retry on failures; **file badges** showing which policies ran on a file (sidebar + files page), tinted to the policy colour. - Reuses the **Watched Folders** engine for each policy's backing folder; policy-owned folders are filtered out of the Watched Folders UI. ## Notes - Gated by `POLICIES_ENABLED` (true in proprietary, false in core) — unreachable in the open-source build. - Frontend-only diff; depends on the backend Policies engine and the merged Watched Folders feature.
This commit is contained in:
@@ -44,6 +44,25 @@
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* The native option popup is OS-rendered: without explicit colours it falls
|
||||
* back to the UA scheme (white) while the option text inherits the themed
|
||||
* (light) colour — i.e. white-on-white in dark mode wherever the surrounding
|
||||
* app keeps color-scheme: light (e.g. the editor, whose dark mode is driven by
|
||||
* Mantine, not color-scheme). Theme the options explicitly and pin the
|
||||
* select's color-scheme to the active SUI theme so the popup is always legible.
|
||||
*/
|
||||
.sui-select__el option {
|
||||
background-color: var(--color-surface);
|
||||
color: var(--color-text-1);
|
||||
}
|
||||
[data-theme="dark"] .sui-select__el {
|
||||
color-scheme: dark;
|
||||
}
|
||||
[data-theme="light"] .sui-select__el {
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
.sui-select--sm .sui-select__el {
|
||||
font-size: 0.8125rem;
|
||||
padding-left: var(--space-2);
|
||||
|
||||
Reference in New Issue
Block a user