Add Rental Policies and Limits
[cs356-p2-videostore.git] / app / controllers / video_policy_controller.rb
index 4be73da..7999bc0 100644 (file)
@@ -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'