Description

The File Delete module adds the ability to easily delete files within Drupal administration.

It changes files from the "Permanent" status to the "Temporary" status. These files will be deleted by Drupal during its cron runs.

If a file is registered as being used somewhere, the Module will not allow it to be deleted.

Project link

https://www.drupal.org/project/file_delete

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/file_delete.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-file_delete.git

CommentFileSizeAuthor
#3 file_delete.png9.24 KBvernit

Comments

jonnyeom created an issue. See original summary.

vernit’s picture

You need to resolved raise in PAReview. Important issue related to dependency namespace into info.yml

like :

drupal:node

vernit’s picture

Issue summary: View changes
StatusFileSize
new9.24 KB
vernit’s picture

Status: Needs review » Needs work
jonnyeom’s picture

Status: Needs work » Needs review

Vernit,
Thanks for those updates.

I resolved all of the warnings from PAReview.
https://pareview.sh/pareview/https-git.drupal.org-project-file_delete.git

Could you take a look again?

avpaderno’s picture

Title: [D8] File Delete (D8) » [D8] File Delete
Issue summary: View changes

Thank you for applying! I added the Git instructions for non-maintainer users.

mostepaniukvm’s picture

Status: Needs review » Needs work

Hi @jonnyeom,
Thanks for contributing!
I checked the code and found some minor remarks.

1. I think will be useful to specify that $entity is an instance of FileInterface for this form. You can add

  /**
   * The file entity being used by this form.
   *
   * @var \Drupal\file\FileInterface
   */
  protected $entity;

2. I don't sure if there is a reason to declare $fileUsage property as private. Maybe declare it as protected will be enough?

I hope my remarks have a sense.

jonnyeom’s picture

Status: Needs work » Needs review

@mostepaniukvm

Both really good ideas, especially since I am using FileInterface specific methods.
I pushed those updates and re-ran the pareview

Many thanks!

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for your contribution!

  • FileDeleteForm::submitForm(): Performing validation should be done in the validate callback, not in the submit callback. Actually you should show the information that a file is in use directly on the form before any button is clicked. You could even disable the submit button in that case.

Did not see any security issues, looks good to me!

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

jonnyeom’s picture

Thanks everyone for the review!

@kiamlaluno Do you know how long it takes for the changes to show?
And yes, I think I may begin assisting with the review process.

@klausi Solid point. I will be updating that.

klausi’s picture

@jonnyeom: you need to edit the project page and opt into security advisory coverage yourself.

avpaderno’s picture

@klausi is correct: We edit the user accounts to make users able to opt into security coverage for every project they create, but that requires they edit their projects. There is a Security advisory coverage setting, on https://www.drupal.org/node/3091257/edit.

jonnyeom’s picture

Found it.
Thanks @klausi and @kiamlauno.

This was a solid review process

klausi’s picture

Thank you! Please also note that unstable alpha and beta releases are not covered by the drupal security team, so best release a stable version next.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.