def check_slice_perms(self, slice_id):
    """
    Check if user can access a cached response from slice_json.

    This function takes `self` since it must have the same signature as the
    the decorated method.

    """
    form_data, slc = get_form_data(slice_id, use_slice_data=True)
    datasource_type = slc.datasource.type
    datasource_id = slc.datasource.id
    viz_obj = get_viz(
        datasource_type=datasource_type,
        datasource_id=datasource_id,
        form_data=form_data,
        force=False,
    )
    security_manager.assert_datasource_permission(viz_obj.datasource)
def check_slice_perms ( self , slice_id ) : form_data , slc = get_form_data ( slice_id , use_slice_data = True ) datasource_type = slc . datasource . type datasource_id = slc . datasource . id viz_obj = get_viz ( datasource_type = datasource_type , datasource_id = datasource_id , form_data = form_data , force = False , ) security_manager . assert_datasource_permission ( viz_obj . datasource )
Check if user can access a cached response from slice_json.

    This function takes `self` since it must have the same signature as the
    the decorated method.