mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
* Initial pass at household invites * Invitee setup * Clean up add member form * Lint and other tweaks * Security cleanup * Lint * i18n fixes * More i18n cleanup * Show pending invites * Don't use turbo on the form * Improved email design * Basic tests * Lint * Update onboardings_controller.rb * Registration + invite cleanup * Lint * Update brakeman.ignore * Update brakeman.ignore * Self host invite links * Test tweaks * Address missing param error
17 lines
384 B
Ruby
17 lines
384 B
Ruby
module Invitable
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
helper_method :invite_code_required?
|
|
end
|
|
|
|
private
|
|
def invite_code_required?
|
|
return false if @invitation.present?
|
|
self_hosted? ? Setting.require_invite_for_signup : ENV["REQUIRE_INVITE_CODE"] == "true"
|
|
end
|
|
|
|
def self_hosted?
|
|
Rails.application.config.app_mode.self_hosted?
|
|
end
|
|
end
|