summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-04-17 10:26:30 +0200
committerPeter Kozak <spag@golwen.net>2013-04-17 10:26:30 +0200
commit73172e5ce8f863951476559890fdf7528037bc07 (patch)
tree6752290f9c2854148f0ee0a77a6a739b7a62219f /app/controllers
parenta1eb4fa1f6460dc2c56a5b8799cc6713f1379878 (diff)
tenant fax_accounts
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/fax_accounts_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/fax_accounts_controller.rb b/app/controllers/fax_accounts_controller.rb
index 031080e..804cdb9 100644
--- a/app/controllers/fax_accounts_controller.rb
+++ b/app/controllers/fax_accounts_controller.rb
@@ -1,7 +1,8 @@
class FaxAccountsController < ApplicationController
load_resource :user
+ load_resource :tenant
load_resource :user_group
- load_and_authorize_resource :fax_account, :through => [:user, :user_group]
+ load_and_authorize_resource :fax_account, :through => [:user, :user_group, :tenant]
before_filter :set_and_authorize_parent
before_filter :spread_breadcrumbs
@@ -54,7 +55,7 @@ class FaxAccountsController < ApplicationController
private
def set_and_authorize_parent
- @parent = @user || @user_group
+ @parent = @user || @user_group || @tenant
authorize! :read, @parent
end