X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fgame_policy_controller.rb;h=f2ca039e76675a21c81d0245e510361cf74faf89;hb=HEAD;hp=9ef608fc7da9950123c0c970723b6fc6f321bfb1;hpb=bf5c679032a167a9eeb4aa16284cd5dd2426a12a;p=cs356-p2-videostore.git diff --git a/app/controllers/game_policy_controller.rb b/app/controllers/game_policy_controller.rb index 9ef608f..f2ca039 100644 --- a/app/controllers/game_policy_controller.rb +++ b/app/controllers/game_policy_controller.rb @@ -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'