X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Flogin_controller.rb;fp=app%2Fcontrollers%2Flogin_controller.rb;h=f557c3ecfac1c1abee7aff97eff5f4f0ac29fbe5;hb=233a6b122bc4aed44a0babee0797d2dba6da5b06;hp=93524378d3e0c26eaeeb55142429f0f2d1056e7b;hpb=43745f29d581cad82adaa2071bfd97977ec502f6;p=cs356-p2-videostore.git diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb index 9352437..f557c3e 100644 --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -2,7 +2,10 @@ class LoginController < ApplicationController layout "admin" # Make sure that a user logs in before doing any action here - before_filter :authorize, :except => :login + before_filter :authorize, :only => :index + + # Only managers can do the following actions + before_filter :manager, :only => [:add_user, :delete_user, :list_users] def add_user @user = User.new(params[:user]) @@ -51,4 +54,5 @@ class LoginController < ApplicationController def list_users @all_users = User.find(:all) end + end