Looks like a doc can be shared to a group.
Also, I noticed that there is a API to list permissions of a doc, which is getPermissions
Assume a doc is shared to user_a, and group_1. Group_1 includes user_b and user_c.
I wonder what will the getPermissions API return?
Does it return user_a and Group_1?
Or, it will return user_a, user_b, user_c and Group_1?
Hello @kakukogou
As far as I know, the getPermission
API will return all the sharing mechanisms of your doc. If you share your doc directly with someone via email, the API will list every person the doc is shared with.
However, you can also share your doc with everyone on the internet using a link, as well as with a workspace or a folder where the doc is stored. In these three cases, I believe (though I could be wrong) that the API will return these permissions as a group, rather than listing individual users within each “group”—such as people in the workspace or those who have access to the folder.
If I have some free time, I’ll run a few tests to confirm this.
Best regards,
Arnhold
1 Like
Hi @Felipe_Arnhold ,
Thanks so much for your reply!
While we’re sharing a doc, there is an option to “invite google group”.
Also, while we’re calling the “list permissions” API, the principal type in the response could be a group: Coda API (v1) Reference Documentation
So, I am wondering what if the “list permissions” API only returns the group but not the members of the group, how could we know the members under the group? Is seems that there is no API for this purpose.
1 Like
Sorry, I completely forgot about Google Groups.
Since I work with the Microsoft ecosystem here in my company, I’ve never used this function in Coda docs. However, I’m afraid your assumption might be correct—the Coda API will likely only return the Google Group itself, not the individual members within it.
Perhaps there’s a Google API that can retrieve the members using the group information, but I’m not familiar with it. These are just assumptions on my part.
Best regards,
Arnhold