Sha256: fe59e485e192b323adc5d73369b8e27251d2eab62664567754f6c8e36c84474a
Contents?: true
Size: 701 Bytes
Versions: 2
Compression:
Stored size: 701 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", "live_preview"] skip_before_action :verify_authenticity_token, if: :json_request? 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 def json_request? request.format.json? end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hackathon_manager-0.11.1 | app/controllers/manage/application_controller.rb |
hackathon_manager-0.11.0 | app/controllers/manage/application_controller.rb |