Module: Kaui::PermissionsHelper

Defined in:
app/helpers/kaui/permissions_helper.rb

Instance Method Summary collapse

Instance Method Details

#can_close_account?Boolean

Returns:

  • (Boolean)

4
5
6
7
8
9
10
11
12
# File 'app/helpers/kaui/permissions_helper.rb', line 4

def can_close_account?
  isAuthorizedWhen = true
  isAuthorizedWhen &= can? :cancel, Kaui::Subscription
  isAuthorizedWhen &= can? :pause_resume, Kaui::Subscription
  isAuthorizedWhen &= can? :add, Kaui::Tag
  isAuthorizedWhen &= can? :item_adjust, Kaui::Invoice

  isAuthorizedWhen
end