Talent-Catalog / talentcatalog

https://tctalent.org
GNU Affero General Public License v3.0
11 stars 4 forks source link

Google Drive subfolder permissions - need review #850

Open camerojo opened 5 months ago

camerojo commented 5 months ago

OLD ISSUE NAME: Getting file permission error when sharing an attachment in Angular|Candidate|AdditionalInfo. Reusing ticket as it has all the information.

From Mariam See https://refugeejobsmarket.slack.com/archives/C42S4AJ73/p1712348835441979

camerojo commented 5 months ago

The exception is thrown from the publishDoc method in CandidateSavedListServiceImpl

It looks like google has failed to update the file permissions @cazcam34

cazcam34 commented 5 months ago

ISSUES:

SOLUTIONS?:

My opinion: Change all subfolders permission to not accessible to anyone with link. This gives us greater control over what files we make publicly viewable, and it would stop the error occurring (it occurs by calling a create permission method on a permission that is already present through inheritance). Also by making a folder publicly viewable (and therefore all it's contents), it means files that are removed by candidates will still be viewable as they are not deleted but just renamed. So this is not something we want to be doing.

HOWEVER the reason we made these folders publicly viewable (anyone with link permission type) was that they were shared with fragomen. I think there may be examples of subfolders which could be publicly viewable, but we default to not and perhaps in the publicly viewable folder name we preface it with "PUBLIC: xxxx" so that it is clear to users that if they move files into that folder it will become also publicly viewable. Again though we want to avoid people moving things directly on the drive, and perhaps automating file uploads into the correct subfolder would resolve this. Eg. Automate all CVs to go into Employer folder. However as discussed above this folder would need to be not publicly viewable.

samschlicht commented 2 months ago

Just a quick note that this came up again — many thanks to @cazcam34 for already having put the work in! (See #1113)

samschlicht commented 2 months ago

Just adding that Mariam mentions in this thread that the team is reviewing their systems for filing attachments and has been using the base folder alone with good results.

I mention that it would be great to understand better what's creating the need to use Google Drive. For many reasons it'd be better if this weren't happening

My message is tentative and doesn't promise or formally request anything, but I'd suggest this would be a worthwhile area for a bit of deliberate consultation.