-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a site setting to hide 'Already have an account? Sign in' (#5985)
* Added a site setting to hide 'Already have an account? Sign in' * Eslint
- Loading branch information
1 parent
5e1dbb4
commit f9309d9
Showing
7 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
db/data/20250130160334_add_sign_in_on_room_join_to_site_settings.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
class AddSignInOnRoomJoinToSiteSettings < ActiveRecord::Migration[7.1] | ||
def up | ||
setting = Setting.find_or_create_by(name: 'SignInOnRoomJoin') | ||
|
||
SiteSetting.create!(setting:, value: 'true', provider: 'greenlight') unless SiteSetting.exists?(setting:, provider: 'greenlight') | ||
|
||
Tenant.find_each do |tenant| | ||
SiteSetting.create!(setting:, value: 'true', provider: tenant.name) unless SiteSetting.exists?(setting:, provider: tenant.name) | ||
end | ||
end | ||
|
||
def down | ||
Tenant.find_each do |tenant| | ||
SiteSetting.find_by(setting: Setting.find_by(name: 'SignInOnRoomJoin'), provider: tenant.name)&.destroy | ||
end | ||
|
||
SiteSetting.find_by(setting: Setting.find_by(name: 'SignInOnRoomJoin'), provider: 'greenlight')&.destroy | ||
|
||
Setting.find_by(name: 'SignInOnRoomJoin')&.destroy | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
DataMigrate::Data.define(version: 20240812210436) | ||
DataMigrate::Data.define(version: 20250130160334) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters