FEATURE: Allow invite only and Discourse connect (#20961)

Invite only and Discourse connect could not be enabled at the same time
because of some legacy reason. This is a follow up commit to ce04db8,
355d51a and 40f6ceb.
This commit is contained in:
Bianca Nenciu
2023-04-04 19:52:11 +03:00
committed by GitHub
parent 73325c6c35
commit 9ff105973f
5 changed files with 2 additions and 40 deletions

View File

@ -24,24 +24,6 @@ RSpec.describe EnableSsoValidator do
end
end
describe "when invite_only is set" do
before do
SiteSetting.invite_only = true
SiteSetting.discourse_connect_url = "https://example.com/sso"
end
it "allows a false value" do
expect(subject.valid_value?("f")).to eq(true)
end
it "doesn't allow true" do
expect(subject.valid_value?("t")).to eq(false)
expect(subject.error_message).to eq(
I18n.t("site_settings.errors.discourse_connect_invite_only"),
)
end
end
describe "when 'sso url' is present" do
before { SiteSetting.discourse_connect_url = "https://www.example.com/sso" }