Sha256: 06351720d190fcf968afbe770a987817c1e63438d02265cfbd3bb16d3c5f4e34

Contents?: true

Size: 556 Bytes

Versions: 17

Compression:

Stored size: 556 Bytes

Contents

require_dependency 'notee/application_controller'

module Notee
  class NoteesController < ApplicationController
    # callbacks
    skip_before_action :restrict_access_json, only: [:index]
    before_action :restrict_access, only: [:index]

    def index
    end

    private

    def restrict_access
      # authenticate_or_request_with_http_token do |token, options|
      #   Token.exists?(access_token: token)
      # end

      unless Token.exists?(access_token: session[:access_token])
        redirect_to new_token_path
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
notee-1.1.2.4 app/controllers/notee/notees_controller.rb
notee-1.1.2.3 app/controllers/notee/notees_controller.rb
notee-1.1.2.2 app/controllers/notee/notees_controller.rb
notee-1.1.2.1 app/controllers/notee/notees_controller.rb
notee-1.1.2 app/controllers/notee/notees_controller.rb
notee-1.1.1 app/controllers/notee/notees_controller.rb
notee-1.1.0 app/controllers/notee/notees_controller.rb
notee-1.0.8 app/controllers/notee/notees_controller.rb
notee-1.0.7 app/controllers/notee/notees_controller.rb
notee-1.0.6 app/controllers/notee/notees_controller.rb
notee-1.0.5 app/controllers/notee/notees_controller.rb
notee-1.0.4 app/controllers/notee/notees_controller.rb
notee-1.0.3 app/controllers/notee/notees_controller.rb
notee-1.0.2 app/controllers/notee/notees_controller.rb
notee-1.0.1 app/controllers/notee/notees_controller.rb
notee-1.0.0 app/controllers/notee/notees_controller.rb
notee-0.4.0 app/controllers/notee/notees_controller.rb