mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Merge pull request #911 from Freika/fix/activate-selfhosted-users
Fix/activate selfhosted users
This commit is contained in:
commit
ff6d5f1c97
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