Change the default route to the login page
[cs356-p2-videostore.git] / app / controllers / rentable_policy_controller.rb
index f99fbed..84c4e7c 100644 (file)
@@ -1,4 +1,11 @@
 class RentablePolicyController < ApplicationController
+
+  # Make sure that a user logs in before doing any action here
+  before_filter :authorize, :only => [:index, :list, :show]
+
+  # Make sure the user is a manager before doing any action specified
+  before_filter :manager, :only => [:new, :create, :edit, :update, :destroy]
+
   def index
     list
     render :action => 'list'