Permalink
Browse files

So I noticed that the CAS beforefilter was basically on top of every …

…controller, which didn't seem very restful, so instead I just through it on top of the application controller and got rid of it everywhere else (except where it was modified [ie, when exceptions where put there]. I've tested a little, and things seem fine, although I am getting some bugs that I get with or without this change (so I'm pretty sure they're not caused by this change. Anywho, if this is actually really dumb, we can just role back this commit (yay git! Thanks Linus)
  • Loading branch information...
1 parent bb541b9 commit 610ae76a81d422407a51f83276b3ebb18c620964 @iamringo iamringo committed Jun 4, 2009
@@ -1,6 +1,8 @@
# 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
+ # Check authentication with CAS login
+ before_filter CASClient::Frameworks::Rails::Filter
before_filter :set_user_exists
before_filter :delete_user_permission_cache
@@ -1,6 +1,6 @@
class ClockController < PayformApplicationController
- before_filter CASClient::Frameworks::Rails::Filter
+
def index
@clock = Clock.find_or_create(get_user, get_dept_from_url)
@@ -1,5 +1,5 @@
class FoodItemsController < ApplicationController
- before_filter CASClient::Frameworks::Rails::Filter
+
layout "iotabs"
# GET /food_items
@@ -1,8 +1,8 @@
class IndexController < ApplicationController
- # Check authentication with CAS login
- before_filter CASClient::Frameworks::Rails::Filter
+
+
before_filter :chooser
def index
@@ -1,5 +1,5 @@
class IotabsController < ApplicationController
- before_filter CASClient::Frameworks::Rails::Filter
+
# GET /iotabs
# GET /iotabs.xml
@@ -1,7 +1,7 @@
class PayformApplicationController < ApplicationController
- # Check authentication with CAS login
- before_filter CASClient::Frameworks::Rails::Filter
+
+
before_filter :fetch_user_data
before_filter :chooser
@@ -1,7 +1,7 @@
class ShiftApplicationController < ApplicationController
- # Check authentication with CAS login
- before_filter CASClient::Frameworks::Rails::Filter
+
+
before_filter :chooser
helper_method :render_to_string #this allow calling render_to_string from the view and helper. -H
@@ -2,7 +2,7 @@
class UserAdminController < ApplicationController
helper_method :superuser_access?
- before_filter CASClient::Frameworks::Rails::Filter
+
before_filter :chooser
before_filter :set_navbar
auto_complete_for :group, :name
@@ -3,7 +3,7 @@
class SimpleExampleController < ApplicationController
# This will force CAS authentication before the user
# is allowed to access any action in this controller.
- before_filter CASClient::Frameworks::Rails::Filter
+
def index
@username = session[:cas_user]

0 comments on commit 610ae76

Please sign in to comment.