X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Flogin_controller.rb;h=53cd00b72fba74fbb89a4d911971031c6e67916c;hb=c372b648227285462ed99c4f608905f690faf827;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..53cd00b 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, :maintenence] + + def maintenence + render :action => 'maintenence' + 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