Show imported Seerr accounts while preserving linked-user deduplication
Magent CI/CD / verify (push) Successful in 10m42s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Skipped

This commit is contained in:
2026-09-07 15:20:10 +12:00
parent 697fc235ee
commit 0637860b95
2 changed files with 20 additions and 11 deletions
+3 -11
View File
@@ -1223,9 +1223,8 @@ def get_all_users() -> list[Dict[str, Any]]:
"is_expired": _is_datetime_in_past(row[12]),
}
)
# Admin user management uses Jellyfin as the source of truth for non-admin
# user objects. Seerr rows are treated as enrichment-only and hidden
# from admin/user-management views to avoid duplicate accounts in the UI.
# Imported Seerr accounts must remain manageable. Prefer a Jellyfin/local
# account when a linked duplicate exists, without hiding Seerr-only users.
def _provider_rank(user: Dict[str, Any]) -> int:
provider = str(user.get("auth_provider") or "local").strip().lower()
if provider == "jellyfin":
@@ -1236,14 +1235,7 @@ def get_all_users() -> list[Dict[str, Any]]:
return 2
return 2
visible_candidates = [
user
for user in all_rows
if not (
str(user.get("auth_provider") or "local").strip().lower() == "jellyseerr"
and str(user.get("role") or "user").strip().lower() != "admin"
)
]
visible_candidates = all_rows
visible_candidates.sort(
key=lambda user: (