Princeton-CDH / pemm-scripts

scripts & tools for the Princeton Ethiopian Miracles of Mary project
Apache License 2.0
1 stars 0 forks source link

As a researcher and database manager, I need to protect the records from accidental edits when multiple people are working in the Google sheet file #67

Closed elambrinaki closed 4 years ago

elambrinaki commented 4 years ago

@rlskoeser Is it possible to create protected ranges conditional on whom a particular manuscript is assigned? For example, Wendy gives me EMML 1606 to work on. She records it on the _contributors sheet (we already have a text field for that, but we can make it a dropdown list of the manuscript names and call "Assigned manusctipt"). After that, all records on the Story Instance sheet with the manuscript name being EMML 1606 can be edited only by Wendy and me (as the principal investigator and the assigned worker). After I finish this manuscript, Wendy updates the "Assigned manusctipt" field on the _contributors sheet, so I have access to a new manuscript, but cannot edit EMML 1606 anymore.

rlskoeser commented 4 years ago

@elambrinaki you can edit protected ranges to give specific people permission on them, but I don't see a way this can be done automatically. I found some references to conditional protection, but I don't see any examples of making it user-specific.

You could probably come up with a workflow where you do this manually, but it seems like it might be pretty cumbersome.

thatbudakguy commented 4 years ago

We sort of do something like this when setting up the sheet, and it works via email. https://github.com/Princeton-CDH/pemm-scripts/blob/7e771ca3cf8880247d9eb9234717a47f40d87bac/src/sheet.ts#L67-L73 Not quite sure how to do it automatically, but you might be able to use the "signals" system to check when new rows are added to a sheet containing emails/assigned manuscripts and do it that way? Definitely far into unknown territory, though.

elambrinaki commented 4 years ago

@rlskoeser @thatbudakguy Thank you for the information!

rlskoeser commented 4 years ago

@thatbudakguy whoa, yeah — so possible but probably pretty complicated. I wonder if a database would be better for this? Much harder to change records you aren't actively working on...

thatbudakguy commented 4 years ago

agreed. I'm not sure when or if we make the call to switch to a database, but it seems like we're assembling some good reasons lately.