mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FEATURE: admin can disable flags (#27171)
UI for admins to disable system flags.
This commit is contained in:

committed by
GitHub

parent
e9c8e182d3
commit
963b9fd157
@ -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
|
||||
|
7
db/migrate/20240527055057_add_score_type_to_flags.rb
Normal file
7
db/migrate/20240527055057_add_score_type_to_flags.rb
Normal 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
|
Reference in New Issue
Block a user