问题
I know that to add permissions to a specific user, you format a permissions resource like so:
new_permission = {
'value': 'me@gmail.com',
'type': 'user',
'role': 'reader'
}
But, what if i want to grant read-only access to anyone? I guess, something like:
new_permission = {
'type': 'anyone',
'role': 'reader',
'value': ???!
}
What do I put as 'value'?
回答1:
Well, it turns out that "value" is not required parameter for type=anyone.
new_permission = {
'type': 'anyone',
'role': 'reader'
}
works just fine.
来源:https://stackoverflow.com/questions/13322287/google-drive-api-how-do-you-insert-permissions-to-make-a-document-publicly-read