Small Cleanups + Merchandise Search
[cs356-p2-videostore.git] / app / controllers / login_controller.rb
index 9352437..7d9b914 100644 (file)
@@ -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