X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=app%2Fcontrollers%2Flogin_controller.rb;h=7d9b914ba8826b917b30c6be45be90baab8a8b7f;hb=HEAD;hp=93524378d3e0c26eaeeb55142429f0f2d1056e7b;hpb=0016f273e94771888df4b73eb334d269f1d4975f;p=cs356-p2-videostore.git diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb index 9352437..7d9b914 100644 --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -2,7 +2,18 @@ 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, :maintenance] + + def maintenance + render :action => 'maintenance' + end + + def limits + render :action => 'limits' + end def add_user @user = User.new(params[:user]) @@ -51,4 +62,5 @@ class LoginController < ApplicationController def list_users @all_users = User.find(:all) end + end