Sha256: 01394f3060e9a5e173b0fd29567bbf6c542a7eb393fcf350f99ad74000deaf16

Contents?: true

Size: 451 Bytes

Versions: 78

Compression:

Stored size: 451 Bytes

Contents

module Account::Onboarding::InvitationListsHelper
  # When sending bulk invitations, the current user is the only one with a membership on the team.
  # This means that we can access all of the available roles with the following code.
  def available_roles
    current_user.memberships.first.roles.map do |role|
      [role.attributes[:key]] + role.attributes[:manageable_roles]
    end.flatten.uniq.reject { |role| role.match?("default") }
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
bullet_train-1.11.0 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.10.0 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.9.0 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.8.5 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.8.4 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.8.3 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.8.2 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.8.1 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.8.0 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.23 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.22 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.21 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.20 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.19 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.18 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.17 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.16 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.15 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.14 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.7.13 app/helpers/account/onboarding/invitation_lists_helper.rb