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.26 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.25 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.24 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.23 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.22 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.21 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.20 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.19 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.18 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.17 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.16 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.15 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.14 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.13 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.12 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.11 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.10 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.9 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.8 app/helpers/account/onboarding/invitation_lists_helper.rb
bullet_train-1.6.7 app/helpers/account/onboarding/invitation_lists_helper.rb