mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
* Add onboarding modes to self-hosted signup * Style form consistently * Configure ONBOARDING_STATE via ENV
22 lines
428 B
Ruby
22 lines
428 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?
|
|
if self_hosted?
|
|
Setting.onboarding_state == "invite_only"
|
|
else
|
|
ENV["REQUIRE_INVITE_CODE"] == "true"
|
|
end
|
|
end
|
|
|
|
def self_hosted?
|
|
Rails.application.config.app_mode.self_hosted?
|
|
end
|
|
end
|