Skip to content

[GRDM-57838] Log user file/folder-zip downloads in Recent Activity; suppress internal system downloads - #769

Draft
ndnhat1 wants to merge 1 commit into
developfrom
feature/nii_grdm_202603_step8/2.1_display_download_history
Draft

[GRDM-57838] Log user file/folder-zip downloads in Recent Activity; suppress internal system downloads#769
ndnhat1 wants to merge 1 commit into
developfrom
feature/nii_grdm_202603_step8/2.1_display_download_history

Conversation

@ndnhat1

@ndnhat1 ndnhat1 commented Jul 27, 2026

Copy link
Copy Markdown

Purpose

Implements the download history display feature (ダウンロード履歴表示機能).

Currently, file download and folder ZIP download actions are silently discarded — create_waterbutler_log() returns early for these action types without creating any log entry. As a result, "Recent Activity" never shows download events.

This change:

  • Enables logging of user-initiated file downloads and folder ZIP downloads in "Recent Activity"
  • Suppresses logging for internal system operations (ONLYOFFICE editor load, timestamp verification, metadata sync, export/restore, etc.) that also trigger WaterButler download callbacks but should not appear as user activity

Changes

Core logging — addons/base/views.py

  • Remove the early-return that discarded all download actions in create_waterbutler_log(); add NodeLog creation for download_file and download_zip
  • Add MFR render detection in get_auth() to suppress file preview/inline editor loads from appearing as user downloads

Internal request suppression — api/base/utils.py

  • URL builder auto-appends callback_log=false to all internal WaterButler requests (excluding meta= and requests with an explicit callback_log), structurally suppressing system-initiated operations without requiring per-caller changes

Frontend display messages

  • Add *_file_downloaded and *_folder_downloaded_zip entries to all addon LogActionList JSON files
  • Update logActionsList.json, anonymousLogActionsList.json, logActionsList_extract.js, and translation files
  • Add *_file_downloaded actions to acceptableLinkedItems in logTextParser.js

Tests

  • Update related unit test cases

QA Notes

Documentation

Side Effects

Ticket

57838

…l allowing logging from user download actions; Add corresponding messages for each hosting provider; Optimize query logic with user information for log download functionality; Update test code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants