Sha256: 7732ad13b856649220e498f052bee7eaaee7e7183deaa23bd0ffb787c2530ecd

Contents?: true

Size: 411 Bytes

Versions: 4

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

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

      is_authorized_when
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kaui-3.0.4 app/helpers/kaui/permissions_helper.rb
kaui-3.0.2 app/helpers/kaui/permissions_helper.rb
kaui-2.2.1 app/helpers/kaui/permissions_helper.rb
kaui-3.0.1 app/helpers/kaui/permissions_helper.rb