X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fvideo_policy_controller.rb;fp=app%2Fcontrollers%2Fvideo_policy_controller.rb;h=918c2e46b3d3dd09fa59cdc9d6445d9ebf584770;hb=233a6b122bc4aed44a0babee0797d2dba6da5b06;hp=4be73daaa6fdb825c2dfcaf72015659d2229178c;hpb=43745f29d581cad82adaa2071bfd97977ec502f6;p=cs356-p2-videostore.git diff --git a/app/controllers/video_policy_controller.rb b/app/controllers/video_policy_controller.rb index 4be73da..918c2e4 100644 --- a/app/controllers/video_policy_controller.rb +++ b/app/controllers/video_policy_controller.rb @@ -1,4 +1,11 @@ class VideoPolicyController < ApplicationController + + # Make sure that a user logs in before doing any action here + before_filter :authorize, :only => [:index, :list, :show] + + # Only managers can do the following actions + before_filter :manager, :only => [:new, :create, :edit, :update, :destroy] + def index list render :action => 'list'