in libs/google/admin.py [0:0]
def un_suspend(self, user_key):
"""
Un-suspends a user.
:param user_key: userKey
:return: bool
Note: When un-suspending a user, we expect the response to be False.
"""
try:
r = json.loads(self.call_google_api(service=self.service,
api_resource="users",
api_method="update",
response_field="suspended",
userKey=user_key,
body={"suspended": False}))
if r is False:
return True
else:
return False
except(ValueError, KeyError, TypeError):
return False