

def _MakeUserEntity(self, email, user_perms):
    "Returns a models.User entity.\n\n    Args:\n      email: str, email address of the user.\n      user_perms: dict, dict of permission types with lists of db.User\n          permissions. i.e. {'filevault_perms': [RETRIEVE, ESCROW]}\n    Returns:\n      models.User entity.\n    "
    u = models.User(key_name=email, user=users.User(email=email))
    for permission_type in permissions.TYPES:
        u.SetPerms(user_perms.get(permission_type, []), permission_type)
    return u

dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/server/cron/group_sync.py GroupSync._MakeUserEntity/original