summaryrefslogtreecommitdiff
path: root/app/controllers/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/application.rb')
-rw-r--r--app/controllers/application.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
new file mode 100644
index 0000000..30f98da
--- /dev/null
+++ b/app/controllers/application.rb
@@ -0,0 +1,16 @@
+# Filters added to this controller will be run for all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+class ApplicationController < ActionController::Base
+ before_filter :authenticate, :except => [ :login, :sign_on, :register, :create, :revoke_pass, :do_revoke, :smokeping, :all ]
+
+
+protected
+ def authenticate
+ #session[:url] = url_for
+ session[:url] = request.env["REQUEST_URI"]
+ unless session[:person]
+ redirect_to :controller => 'person',
+ :action => 'login'
+ end
+ end
+end