mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-10-03 22:07:04 +01:00
Download history refactor (#700)
- Much simpler handling of downloads in the activity sidebar, and improved storage, persistence and UI behavior. - Replace `ActivityService` with direct storage on `DownloadHistoryService` and `download_requests` and removes the activity_log/activity_dismissals tables - Simplify no-auth mode by removing the fake user row pattern, handled internally - Add local download fallback so history entries can still serve files after tasks leave the queue - Downloads, requests and history are now entirely persistent between updates / restarts, and correctly tied to each user.
This commit is contained in:
@@ -106,20 +106,6 @@ class TestAdminUsersListEndpoint:
|
||||
users = resp.json
|
||||
assert "password_hash" not in users[0]
|
||||
|
||||
def test_list_users_hides_internal_no_auth_activity_user(self, admin_client, user_db):
|
||||
user_db.create_user(
|
||||
username="__shelfmark_noauth_activity__",
|
||||
display_name="No-auth Activity",
|
||||
role="admin",
|
||||
)
|
||||
user_db.create_user(username="alice", email="alice@example.com")
|
||||
|
||||
resp = admin_client.get("/api/admin/users")
|
||||
assert resp.status_code == 200
|
||||
usernames = [u["username"] for u in resp.json]
|
||||
assert "__shelfmark_noauth_activity__" not in usernames
|
||||
assert "alice" in usernames
|
||||
|
||||
def test_list_users_includes_auth_source_and_is_active(self, admin_client, user_db):
|
||||
user_db.create_user(username="local_user", auth_source="builtin")
|
||||
user_db.create_user(
|
||||
|
||||
Reference in New Issue
Block a user