

@require_admin
def post(self, group_id):
    data_source_id = request.json['data_source_id']
    data_source = models.DataSource.get_by_id_and_org(data_source_id, self.current_org)
    group = models.Group.get_by_id_and_org(group_id, self.current_org)
    data_source.add_group(group)
    self.record_event({
        'action': 'add_data_source',
        'timestamp': int(time.time()),
        'object_id': group_id,
        'object_type': 'group',
        'member_id': data_source_id.id,
    })
    return data_source.to_dict(with_permissions=True)

dataset/ETHPy150Open getredash/redash/redash/handlers/groups.py GroupDataSourceListResource.post/VarMisuse@96/159 `data_source`->`data_source_id`