FEATURE: admin can disable flags (#27171)

UI for admins to disable system flags.
This commit is contained in:
Krzysztof Kotlarek
2024-05-29 14:39:58 +10:00
committed by GitHub
parent e9c8e182d3
commit 963b9fd157
31 changed files with 350 additions and 7 deletions

View File

@ -54,3 +54,13 @@ Flag.seed do |s|
s.custom_type = true
s.applies_to = %w[Post Topic Chat::Message]
end
Flag.seed do |s|
s.id = 9
s.name = "needs_approval"
s.position = 6
s.notify_type = false
s.auto_action_type = false
s.custom_type = false
s.score_type = true
s.applies_to = %w[]
end

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddScoreTypeToFlags < ActiveRecord::Migration[7.0]
def change
add_column(:flags, :score_type, :boolean, default: false, null: false)
end
end