Admin view of all users' download jobs and files, including soft-deleted ones

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
24/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
php

Research direction

Start by reading the implementation of CurrentUserExtension, the soft-delete filter, and issue #47 to understand how download jobs and files are currently scoped and retained. The proposal also calls for admin API operations and PWA views, plus restore and permanent-delete actions that remove files from disk. Agree on the endpoint design and required admin role first; done means admins can distinguish, restore, and permanently delete soft-deleted records.

Written by the indexing model from the issue text.

Description

enhancement

Follow-up of #47.

Context

#47 soft-deletes DownloadJobs (when their owner deletes them) and DownloadedFiles (when all jobs linked to them are soft-deleted). The data is kept in the database, intended to be visible to admins, but no admin view exists:

  • CurrentUserExtension restricts every API query on owner-filterable resources to the current user's own records, admins included.
  • The gedmo soft-delete filter hides deleted records for everyone.

Proposal

  • Let ROLE_ADMIN (or ROLE_DOWNLOAD-API_ADMIN) bypass the owner restriction in CurrentUserExtension, or add dedicated admin operations.
  • Disable the soft-delete filter for admins on those operations, and expose deletedAt so deleted records can be told apart.
  • Admin actions on soft-deleted DownloadedFiles: restore, and permanently delete (including removing the file from disk, which #47 deliberately never does automatically).
  • Admin panel (PWA) views for the above.

Open questions

  • Reuse the existing endpoints with a role-based bypass, or separate /admin/... operations?
  • Which role should get access: ROLE_ADMIN or only ROLE_DOWNLOAD-API_ADMIN?
Dominant language
PHP
Stars
1
Forks
0
Avg merge
3d 50m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FetchDock/fetchdock-server

All issues in FetchDock/fetchdock-server

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.