X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fvideo_policy_controller.rb;h=7999bc0d689c259de7dc402dfb94291128d9cb1b;hb=d9ccb8cf52aee119343545cb734e185580daf352;hp=4be73daaa6fdb825c2dfcaf72015659d2229178c;hpb=01114330b962728805d3c43f2f1a1423f2bd66b3;p=cs356-p2-videostore.git diff --git a/app/controllers/video_policy_controller.rb b/app/controllers/video_policy_controller.rb index 4be73da..7999bc0 100644 --- a/app/controllers/video_policy_controller.rb +++ b/app/controllers/video_policy_controller.rb @@ -1,4 +1,12 @@ class VideoPolicyController < ApplicationController + layout "admin" + + # 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'