diff options
Diffstat (limited to 'billing/app/controllers/billing_base_controller.rb')
-rw-r--r-- | billing/app/controllers/billing_base_controller.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/billing/app/controllers/billing_base_controller.rb b/billing/app/controllers/billing_base_controller.rb index 67dff72..f6e233b 100644 --- a/billing/app/controllers/billing_base_controller.rb +++ b/billing/app/controllers/billing_base_controller.rb @@ -4,12 +4,14 @@ class BillingBaseController < ApplicationController helper 'billing' # required for navigation to work. - #TODO doesn't work for admins def assign_user - if params[:id] + if params[:user_id] + @user = User.find_by_param(params[:user_id]) + elsif params[:action] == "confirm" # confirms will come back with different ID set, so check for this first + # This is only for cases where an admin cannot apply action for customer, but should be all confirms + @user = current_user + elsif params[:id] @user = User.find_by_param(params[:id]) - else - @user = current_user #TODO not always correct for admins viewing another user! end end |