

@require_admin
def post(self, group_id, 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)
    view_only = request.json['view_only']
    data_source.update_group_permission(group, view_only)
    self.record_event({
        'action': 'change_data_source_permission',
        'timestamp': int(time.time()),
        'object_id': group_id,
        'object_type': 'group',
        'member_id': data_source.id,
        'view_only': group,
    })
    return data_source.to_dict(with_permissions=True)

dataset/ETHPy150Open getredash/redash/redash/handlers/groups.py GroupDataSourceResource.post/VarMisuse@107/181 `view_only`->`group`