app/controllers/application_controller.rb
# Make sure user is allowed to access tag wrangling pages
Make sure user is allowed to access tag wrangling pages
Make sure user is allowed to access tag wrangling pages
def check_permission_to_wrangle
    if @admin_settings.tag_wrangling_off? && !logged_in_as_admin?
      flash[:error] = "Wrangling is disabled at the moment. Please check back later."
      redirect_to root_path
    else
      logged_in_as_admin? || permit?("tag_wrangler") || access_denied
    end
  end
def check_permission_to_wrangle if @admin_settings . tag_wrangling_off? && ! logged_in_as_admin? flash [ :error ] = "Wrangling is disabled at the moment. Please check back later." redirect_to root_path else logged_in_as_admin? || permit? ( "tag_wrangler" ) || access_denied end end
Make sure user is allowed to access tag wrangling pages
Make sure user is allowed to access tag wrangling pages