Skip to content
This repository was archived by the owner on Mar 9, 2020. It is now read-only.

Commit fa19fd6

Browse files
committed
Welcome#index now needs a login.
1 parent 0738413 commit fa19fd6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/controllers/application_controller.rb

+4
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base
22
# Prevent CSRF attacks by raising an exception.
33
# For APIs, you may want to use :null_session instead.
44
protect_from_forgery with: :exception
5+
6+
def not_authenticated
7+
redirect_to login_url, :alert => "First login to access this page."
8+
end
59
end

app/controllers/welcome_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class WelcomeController < ApplicationController
2+
before_filter :require_login, :only => :index
3+
24
def index
35
end
46
end

0 commit comments

Comments
 (0)