简体   繁体   中英

Assigning Google Calendar access to all users in a group (Java)

I can create a google calendar in my Java app.

I can assign it to a particular user in my Google domain:

AclRule rule = new AclRule();
Scope scope = new Scope();

scope.setType("user");
scope.setValue("user1@mydomain.com");

rule.setScope(scope);
rule.setRole("reader");

and the created calendar appears in user1's calendars.

Yet when I try to assign some other calendar to a group (which said user1 belongs to):

AclRule rule = new AclRule();
Scope scope = new Scope();

scope.setType("group");
scope.setValue("group1@mydomain.com");

rule.setScope(scope);
rule.setRole("reader");

user1 couldn't see the created calendar in his calendar list.

But the calendar is created successfully.

Is this correct functionality? Or should I just add Acl rule per group user ? Or I am doing something wrong and there is other way to assign some calendar to all the users in a group ?

for future people running into problems: I had this issue and it's because the creator of the calendar wasn't in the group. Make sure the "sharer" is in the google group you are sharing your calendar with

在为组分配日历访问权限时,每个组用户都会收到一个邀请来访问该日历。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM