Skip to content

Instantly share code, notes, and snippets.

@eojji
Created January 16, 2018 03:43
Show Gist options
  • Save eojji/b50582cbed97e477de25b845c4bdc168 to your computer and use it in GitHub Desktop.
Save eojji/b50582cbed97e477de25b845c4bdc168 to your computer and use it in GitHub Desktop.
How do I know a gmail account is a member of Google Groups?
// Can I open shared file in a group?
function isOpenSharedFileByProp_() {
// https://developers.google.com/apps-script/reference/properties/properties-service#getScriptProperties()
var ss, ssIdsharedGfolderCopy;
ssIdsharedGfolderCopy = PropertiesService.getScriptProperties().getProperty('ssIdsharedGfolderCopy');
// Logger.log(ssIdsharedGfolderCopy);
try {
ss = SpreadsheetApp.openById(ssIdsharedGfolderCopy);
return ss ? true: false;
} catch(e) {
return false;
}
}
function t_isOpenSharedFileByProp() {
var bool = isOpenSharedFileByProp_();
Logger.log('return: %s', bool);
}
@eojji
Copy link
Author

eojji commented Jan 16, 2018

How do I know a gmail account is a member of Google Groups?

https://stackoverflow.com/questions/48240641/how-do-i-know-a-gmail-account-is-a-member-of-google-groups

I am creating a web app with Google Apps Script. I want to know if an app user is a member of Google Groups.

Group site: https://groups.google.com/

It is not groups managed by G suite.

Create a Google spreadsheet. Open this and add the group's email in the sharing task.

When I open a file shared by a group in a script and open it, can I verify that it is a member of the group?

google-apps-script, google-groups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment