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