summaryrefslogtreecommitdiff
path: root/billing
diff options
context:
space:
mode:
Diffstat (limited to 'billing')
-rw-r--r--billing/app/controllers/billing_admin_controller.rb2
-rw-r--r--billing/app/controllers/credit_card_info_controller.rb2
-rw-r--r--billing/app/controllers/customer_controller.rb2
-rw-r--r--billing/app/controllers/payments_controller.rb2
-rw-r--r--billing/app/controllers/subscriptions_controller.rb2
-rw-r--r--billing/test/integration/admin_customer_test.rb4
6 files changed, 7 insertions, 7 deletions
diff --git a/billing/app/controllers/billing_admin_controller.rb b/billing/app/controllers/billing_admin_controller.rb
index cd6149f..e11d4ee 100644
--- a/billing/app/controllers/billing_admin_controller.rb
+++ b/billing/app/controllers/billing_admin_controller.rb
@@ -1,5 +1,5 @@
class BillingAdminController < BillingBaseController
- before_filter :authorize_admin
+ before_filter :require_admin
def show
diff --git a/billing/app/controllers/credit_card_info_controller.rb b/billing/app/controllers/credit_card_info_controller.rb
index 717fa18..fbaa6f1 100644
--- a/billing/app/controllers/credit_card_info_controller.rb
+++ b/billing/app/controllers/credit_card_info_controller.rb
@@ -1,5 +1,5 @@
class CreditCardInfoController < ApplicationController
- before_filter :authorize, :set_user
+ before_filter :require_login, :set_user
def edit
@credit_card = Braintree::CreditCard.find(params[:id])
diff --git a/billing/app/controllers/customer_controller.rb b/billing/app/controllers/customer_controller.rb
index 901cb34..6cbcb44 100644
--- a/billing/app/controllers/customer_controller.rb
+++ b/billing/app/controllers/customer_controller.rb
@@ -1,5 +1,5 @@
class CustomerController < BillingBaseController
- before_filter :authorize, :fetch_customer
+ before_filter :require_login, :fetch_customer
def show
if @customer
diff --git a/billing/app/controllers/payments_controller.rb b/billing/app/controllers/payments_controller.rb
index 0b5abe7..fce6570 100644
--- a/billing/app/controllers/payments_controller.rb
+++ b/billing/app/controllers/payments_controller.rb
@@ -1,5 +1,5 @@
class PaymentsController < BillingBaseController
- before_filter :authorize, :only => [:index]
+ before_filter :require_login, :only => [:index]
def new
fetch_transparent_redirect
diff --git a/billing/app/controllers/subscriptions_controller.rb b/billing/app/controllers/subscriptions_controller.rb
index 01aaab4..f066b3c 100644
--- a/billing/app/controllers/subscriptions_controller.rb
+++ b/billing/app/controllers/subscriptions_controller.rb
@@ -1,5 +1,5 @@
class SubscriptionsController < BillingBaseController
- before_filter :authorize
+ before_filter :require_login
before_filter :fetch_subscription, :only => [:show, :destroy]
before_filter :confirm_cancel_subscription, :only => [:destroy]
before_filter :confirm_self_or_admin, :only => [:index]
diff --git a/billing/test/integration/admin_customer_test.rb b/billing/test/integration/admin_customer_test.rb
index 58a7557..1b9953f 100644
--- a/billing/test/integration/admin_customer_test.rb
+++ b/billing/test/integration/admin_customer_test.rb
@@ -14,8 +14,8 @@ class AdminCustomerTest < ActionDispatch::IntegrationTest
teardown do
Warden.test_reset!
- @user.destroy
- @admin.destroy
+ @user.destroy if @user
+ @admin.destroy if @admin
end
test "check non customer as admin" do