diff options
author | jessib <jessib@riseup.net> | 2013-08-01 12:18:03 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-08-01 12:18:03 -0700 |
commit | a98752629c8d04a5fde2287a924855de63321bb2 (patch) | |
tree | d76250a6c7998de9a8cff9a8912fda0c70a44057 /billing/app/controllers/billing_base_controller.rb | |
parent | 368dbc55966b2b74699065e07de28fe321f286b6 (diff) |
Start to functionality for admins viewing billing of other users.
Diffstat (limited to 'billing/app/controllers/billing_base_controller.rb')
-rw-r--r-- | billing/app/controllers/billing_base_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/billing/app/controllers/billing_base_controller.rb b/billing/app/controllers/billing_base_controller.rb index dc15194..67dff72 100644 --- a/billing/app/controllers/billing_base_controller.rb +++ b/billing/app/controllers/billing_base_controller.rb @@ -4,8 +4,13 @@ class BillingBaseController < ApplicationController helper 'billing' # required for navigation to work. + #TODO doesn't work for admins def assign_user - @user = current_user + if params[:id] + @user = User.find_by_param(params[:id]) + else + @user = current_user #TODO not always correct for admins viewing another user! + end end end |