mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Activate self-hosted users by default
This commit is contained in:
parent
0d703521ee
commit
94b87c0f6a
1 changed files with 15 additions and 0 deletions
15
db/data/20250226192005_activate_selfhosted_users.rb
Normal file
15
db/data/20250226192005_activate_selfhosted_users.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivateSelfhostedUsers < ActiveRecord::Migration[8.0]
|
||||
def up
|
||||
return unless DawarichSettings.self_hosted?
|
||||
|
||||
User.update_all(status: :active) # rubocop:disable Rails/SkipsModelValidations
|
||||
end
|
||||
|
||||
def down
|
||||
return unless DawarichSettings.self_hosted?
|
||||
|
||||
User.update_all(status: :inactive) # rubocop:disable Rails/SkipsModelValidations
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue