Closed elambrinaki closed 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.
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.
@rlskoeser @thatbudakguy Thank you for the information!
@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...
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.
@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.