nytimes / library

A collaborative documentation site, powered by Google Docs.
https://nyt-library-demo.herokuapp.com/
Apache License 2.0
1.15k stars 144 forks source link

Trashed documents show up on site #357

Open ericanastas opened 1 year ago

ericanastas commented 1 year ago

Context (Environment)

Node 18.14.0 Folder source

Expected Behavior

If documents are moved to the trash, and no longer show up in a folder on the google drive interface, I would expect the document to no longer show up on the site as well.

Actual Behavior

Trashed documents continue to show up on the site until they are permanently deleted.

image

image

To Reproduce

Move a document to the trash.

Possible Solution

The getOptions() in search.js includes AND trashed = false, however this filter is not included in the corresponding getOptions() function in list.js.

These options should include the trashed = false filter as well.

afischer commented 1 year ago

Hi @ericanastas, thanks for the report.

As a workaround until this is fixed, you can create a top-level folder called Trash and move files you wish to hide on the site there. This was originally implemented as user permissions around deleting files can be messy within shared drives.

ericanastas commented 1 year ago

Can you elaborate on how the permissions for deleting files can be "messy" in GSDs? Maybe there's something I'm not considering. My understanding is only drive managers can permanently delete files from the trash right? I think most users would expect files that have been moved to the trash to no longer show up on the site.

afischer commented 1 year ago

I'm not sure if this is still the case, but it used to be that users that did not originally own files in shared drives could not delete them, even if they were able to edit or move them.

It's very possible Google has changed the way that permissions work for files in a shared drive in the past few years, so It's definitely worth revisiting.

JacksonRoberts-Git commented 1 month ago

Hi! Is there any chance I could claim or otherwise be assigned to this bug? I am relatively new to GitHub but I want to see if I can help you with this

JacksonRoberts-Git commented 1 month ago

Me again. I am working on a project for class (software engineering) and I need a GitHub task to complete. Not sure if this makes you more or less likely to assign me to this, but I hope you understand where I'm coming from. Thanks.

ericanastas commented 1 month ago

I'm not sure if this is still the case, but it used to be that users that did not originally own files in shared drives could not delete them, even if they were able to edit or move them.

It's very possible Google has changed the way that permissions work for files in a shared drive in the past few years, so It's definitely worth revisiting.

@afischer

This is true. Only managers can permanently delete files, but regular users can still move files to this trash.

https://support.google.com/a/users/answer/12380484?hl=en

image