0

I'm writing a script to manage groups, as in the group there are internal domain's addresses and other domain's addresses. I'd like to programmatically enforce that only the internal domain's users can post to the group.

I use this code:

var groupId = "test@dominio.it";
var groupSettings = AdminGroupsSettings.newGroups();
groupSettings.whoCanPostMessage = ["ALL_IN_DOMAIN_CAN_POST"];
AdminGroupsSettings.Groups.patch(
    groupSettings, groupId
)

But if I then check the "who can post" section in Group Management, I find:

- OWNER yes
- MANAGER yes
- ALL GROUP MEMBER yes
- ALL IN DOMAIN yes
- ANYONE no

In group management I can do this setting:

- OWNER yes
- MANAGER yes
- ALL GROUP MEMBER no
- ALL IN DOMAIN yes
- ANYONE no

But I'd like to set this via Apps Script. Why isn't my code updating the posting permission?

tehhowch
  • 9,645
  • 4
  • 24
  • 42
uffa14
  • 155
  • 1
  • 8
  • Possibly helpful: https://stackoverflow.com/questions/51461276/how-to-update-google-group-settings-with-google-apps-script , https://stackoverflow.com/questions/13774278/google-groups-post-permissions Note that `whoCanPostMessage` should be a `String` – tehhowch Aug 30 '18 at 14:27
  • Yes i know it should be a string, it was just another try. In the second link there's confirm of the "bug". But in web interface i can do it! – uffa14 Aug 31 '18 at 06:21

0 Answers0