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.6.6 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.5 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.4 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.3 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.2 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.1 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.0 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.5.2 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.5.1 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.5.0 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.11 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.10 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.9 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.8 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.7 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.6 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.5 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.4.4 app/helpers/account/onboarding/invitation_lists_helper.rb