mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 22:53:34 +00:00
Fix calendar add ACL (#465)
This commit is contained in:
@ -2981,6 +2981,10 @@ def doCalendarShowACL():
|
||||
print u'Calendar: {0}, ACL: {1}{2}'.format(show_cal, formatACLRule(rule), currentCount(i, count))
|
||||
|
||||
def doCalendarAddACL(calendarId=None, act_as=None, role=None, scope=None, entity=None):
|
||||
if calendarId is None:
|
||||
calendarId = sys.argv[2]
|
||||
if calendarId.find(u'@') == -1:
|
||||
calendarId = u'%s@%s' % (calendarId, GC_Values[GC_DOMAIN])
|
||||
if not act_as:
|
||||
act_as = calendarId
|
||||
_, cal = buildCalendarGAPIObject(act_as)
|
||||
@ -2991,10 +2995,6 @@ def doCalendarAddACL(calendarId=None, act_as=None, role=None, scope=None, entity
|
||||
except oauth2client.client.HttpAccessTokenRefreshError:
|
||||
_, cal = buildCalendarGAPIObject(_getAdminUserFromOAuth())
|
||||
body = {u'scope': {}}
|
||||
if calendarId is None:
|
||||
calendarId = sys.argv[2]
|
||||
if calendarId.find(u'@') == -1:
|
||||
calendarId = u'%s@%s' % (calendarId, GC_Values[GC_DOMAIN])
|
||||
if role is not None:
|
||||
body[u'role'] = role
|
||||
else:
|
||||
|
Reference in New Issue
Block a user