Small Cleanups + Merchandise Search
[cs356-p2-videostore.git] / app / controllers / game_policy_controller.rb
index 9ef608f..f2ca039 100644 (file)
@@ -1,4 +1,12 @@
 class GamePolicyController < ApplicationController
+  layout "admin"
+
+  # Make sure that the user has logged in before they can take any action
+  before_filter :authorize, :only => [:index, :list, :show]
+
+  # Make sure the user is a manager if they want to modify data
+  before_filter :manager, :only => [:new, :create, :edit, :update, :destroy]
+
   def index
     list
     render :action => 'list'