mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: should not be able to rename a system badge
This commit is contained in:
@@ -98,7 +98,7 @@ class Admin::BadgesController < Admin::AdminController
|
||||
def update_badge_from_params(badge, opts={})
|
||||
errors = []
|
||||
Badge.transaction do
|
||||
allowed = Badge.column_names.map(&:to_sym)
|
||||
allowed = Badge.column_names.map(&:to_sym)
|
||||
allowed -= [:id, :created_at, :updated_at, :grant_count]
|
||||
allowed -= Badge.protected_system_fields if badge.system?
|
||||
allowed -= [:query] unless SiteSetting.enable_badge_sql
|
||||
|
Reference in New Issue
Block a user