]> git.cworth.org Git - turbot/blobdiff - turbot/sheets.py
Drop the puzzle ID field from the /puzzle dialog
[turbot] / turbot / sheets.py
index 8ab302d38579a8f744a475a34a39c769f715813a..f2a9681f7c7483593d6cfad973076dadf802c61e 100644 (file)
@@ -16,6 +16,12 @@ def sheets_create(turb, name):
 
     new_sheet = turb.sheets.create(body=spreadsheet_body).execute()
 
+    # Now that we've created a new sheet, we need to also allow anyone
+    # with the link to the sheet to be able to edit it.
+    turb.permissions.create(fileId=new_sheet["spreadsheetId"],
+                            body={'type': 'anyone', 'role': 'writer'},
+                            fields='id').execute()
+
     return {
         'id': new_sheet["spreadsheetId"],
         'url': new_sheet["spreadsheetUrl"]