ui rehaul

This commit is contained in:
Ludwig Lehnert
2026-10-03 09:44:29 +00:00
parent a47542f156
commit 3075d951ba
17 changed files with 428 additions and 102 deletions
+5 -4
View File
@@ -6,6 +6,11 @@ import hashlib
import os
from typing import Mapping, Optional, Tuple
try:
from .account_policy import account_name
except ImportError:
from account_policy import account_name
AUDIT_ACTIONS = frozenset({"read", "write", "move", "delete"})
OPERATION_ACTIONS = {
@@ -41,10 +46,6 @@ def skipped_user_suffixes() -> Tuple[str, ...]:
if suffix.strip()
)
def account_name(user: str) -> str:
account = user.strip().rsplit("\\", 1)[-1]
return account.split("@", 1)[0]
def skip_user(user: str) -> bool:
account = account_name(user).casefold()
return any(account.endswith(suffix) for suffix in skipped_user_suffixes())