Show imported Seerr accounts while preserving linked-user deduplication
This commit is contained in:
+3
-11
@@ -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: (
|
||||
|
||||
Reference in New Issue
Block a user