Sha256: 20021a6fb2d58f36634fbf54db7510ccf45cadff264841925ade6226ab54bb78

Contents?: true

Size: 565 Bytes

Versions: 32

Compression:

Stored size: 565 Bytes

Contents

class Manage::ApplicationController < ApplicationController
  before_action :logged_in
  before_action :limit_admin_access, only: ["edit", "update", "new", "create", "destroy", "convert_to_admin", "deliver", "merge", "perform_merge", "toggle_bus_captain", "duplicate", "update_acc_status", "send_update_email"]

  def logged_in
    authenticate_user!
    return redirect_to root_path unless current_user.try(:admin?)
  end

  def limit_admin_access
    redirect_to url_for(controller: controller_name, action: :index) if current_user.admin_limited_access
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
hackathon_manager-0.7.1 app/controllers/manage/application_controller.rb
hackathon_manager-0.7.0 app/controllers/manage/application_controller.rb
hackathon_manager-0.6.6 app/controllers/manage/application_controller.rb
hackathon_manager-0.6.5 app/controllers/manage/application_controller.rb
hackathon_manager-0.6.4 app/controllers/manage/application_controller.rb
hackathon_manager-0.6.3 app/controllers/manage/application_controller.rb
hackathon_manager-0.6.2 app/controllers/manage/application_controller.rb
hackathon_manager-0.6.1 app/controllers/manage/application_controller.rb
hackathon_manager-0.6.0 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.11 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.10 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.9 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.8 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.7 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.6 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.5 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.4 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.3 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.2 app/controllers/manage/application_controller.rb
hackathon_manager-0.5.1 app/controllers/manage/application_controller.rb