module Biteable

Public Instance Methods

authenticate() click to toggle source
# File lib/biteable.rb, line 8
def authenticate
  if request.params[:edit_page]
    authenticate_or_request_with_http_basic('Administration') do |username, password|
      @bite_authentication = username == ENV['BITES_USERNAME'] && password == ENV['BITES_PASSWORD']
    end
  else
    @bite_authentication = false
  end
end