0

I have the following issue.

I have a Google Sheet that is shared with everyone within my organization(300 people) and they have to have edit rights.

But, certain users from that organization should not be able to edit or even access the file, even tho it's okay if they can just view it.

I'm currently battling this by using a script that checks the users mail(Session.getEffectiveUser().getEmail()) and if they match the address in the array that contains all the addresses it fires an alert modal telling the user they are not eligible.
However, this works but if the users simply closes the alert he/she can continue editing the sheet. Which is not desirable. :)

I've searched but i failed to find a working solution or at least the idea to prevent those few users from the organization to edit this Sheet.

Appreciate any input, thanks!

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • @I'-'I Unfortunately i don't think that would work considering the docs say the following: Note that if any of the users are members of a Google Group that has edit permission, **or if all users in the domain have edit permission, those users will still be able to edit the protected area. **Neither the owner of the spreadsheet nor the current user can be removed. – Escape. Feb 13 '18 at 13:26
  • You cannot block people from accessing a sheet. You could either create a separate Google Group with allowed users and share with the group, or you could create a Team Drive and share it with approved users. There is no way to remove access via apps script. – Brian Feb 13 '18 at 13:36

0 Answers0