mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-07 13:13:34 +00:00
One liner fixes for calendar add/delete ACLs
This commit is contained in:
4
gam.py
4
gam.py
@ -1321,7 +1321,7 @@ def doCalendarAddACL(calendarId=None, act_as=None, role=None, scope=None, entity
|
|||||||
if body[u'scope'][u'type'] == u'domain':
|
if body[u'scope'][u'type'] == u'domain':
|
||||||
try:
|
try:
|
||||||
body[u'scope'][u'value'] = sys.argv[6].lower()
|
body[u'scope'][u'value'] = sys.argv[6].lower()
|
||||||
except KeyError:
|
except IndexError:
|
||||||
body[u'scope'][u'value'] = domain
|
body[u'scope'][u'value'] = domain
|
||||||
callGAPI(service=cal.acl(), function=u'insert', calendarId=calendarId, body=body)
|
callGAPI(service=cal.acl(), function=u'insert', calendarId=calendarId, body=body)
|
||||||
|
|
||||||
@ -1337,7 +1337,7 @@ def doCalendarUpdateACL():
|
|||||||
|
|
||||||
def doCalendarDelACL():
|
def doCalendarDelACL():
|
||||||
calendarId = sys.argv[2]
|
calendarId = sys.argv[2]
|
||||||
entity = sys.argv[4].lower()
|
entity = sys.argv[5].lower()
|
||||||
scope = u'user'
|
scope = u'user'
|
||||||
if entity == u'domain':
|
if entity == u'domain':
|
||||||
scope = u'domain'
|
scope = u'domain'
|
||||||
|
Reference in New Issue
Block a user