Add service accounts to td directly as a manager

This commit is contained in:
Anas 2021-07-19 14:22:21 +03:00 committed by GitHub
parent 18a013bfb6
commit dfb5286137
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ pbar = progress.bar.Bar("Readying accounts", max=len(aa))
for i in aa:
ce = json.loads(open(i, 'r').read())['client_email']
batch.add(drive.permissions().create(fileId=did, supportsAllDrives=True, body={
"role": "fileOrganizer",
"role": "organizer",
"type": "user",
"emailAddress": ce
}))
@ -74,4 +74,4 @@ batch.execute()
print('Complete.')
hours, rem = divmod((time.time() - stt), 3600)
minutes, sec = divmod(rem, 60)
print("Elapsed Time:\n{:0>2}:{:0>2}:{:05.2f}".format(int(hours), int(minutes), sec))
print("Elapsed Time:\n{:0>2}:{:0>2}:{:05.2f}".format(int(hours), int(minutes), sec))