X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Frentable_policy_controller.rb;h=4151e6a1f02dbb37e16c777c572ec167fb450f6d;hb=c372b648227285462ed99c4f608905f690faf827;hp=f99fbedbeaa5ca3ea251240fffabc7d03887dc36;hpb=9b264f25255cc0e7cca3169d99905f590c8be578;p=cs356-p2-videostore.git diff --git a/app/controllers/rentable_policy_controller.rb b/app/controllers/rentable_policy_controller.rb index f99fbed..4151e6a 100644 --- a/app/controllers/rentable_policy_controller.rb +++ b/app/controllers/rentable_policy_controller.rb @@ -1,4 +1,12 @@ class RentablePolicyController < ApplicationController + layout "admin" + + # 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'