Reputation: 270
At my company we use Gsuite. We have a shared Drive with about ~80 colleagues. By default, every colleague is also editor in all the spreadsheets in that drive folder. So in one of those spreadsheet, I try to get an overview of all the colleagues. I'm using this code. It does work fine, but it just returns only ~60 colleagues or so. And I can't figure out why that is.
function getEditors()
{
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var permissions = [];
var viewers = sheet.getEditors();
Logger.log(viewers);
}
So far I can tell, everybody is an editor, just see the screenshot below.
And it's always the same colleagues that are missing. Hope somebody can help me with this!
Upvotes: 1
Views: 427
Reputation: 270
With help from @a-burge I figured it out. Apparently I had to go to the settings in my shared Drive file, where I could see all the colleagues. There were a few who had 'Content manager' instead of 'Contributor' als a role. After changing this, it returned all the colleagues.
Upvotes: 1