app/controllers/management/widgets_controller.rb
# Only shows the delete url in case the user is a site admin for this site
Only shows the delete url in case the user is a site admin for this site
Only shows the delete url in case the user is a site admin for this site
def delete_url(dataset_id, widget_id)
    return if !current_user_is_admin &&
      !current_user.owned_sites.include?(@site)
    management_site_widget_path(
      params[:site_slug],
      widget_id,
      action: :delete,
      dataset: dataset_id
    )
  end
def delete_url ( dataset_id , widget_id ) return if ! current_user_is_admin && ! current_user . owned_sites . include? ( @site ) management_site_widget_path ( params [ :site_slug ] , widget_id , action : :delete , dataset : dataset_id ) end
Only shows the delete url in case the user is a site admin for this site
Only shows the delete url in case the user is a site admin for this site
dataset_id
widget_id