mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 12:02:05 +08:00

This is preparation for a feature that will allow admins to define their custom flags. Current behaviour should stay untouched.
8 lines
137 B
Ruby
8 lines
137 B
Ruby
# frozen_string_literal: true
|
|
|
|
module FlagGuardian
|
|
def can_edit_flag?(flag)
|
|
@user.admin? && !flag.system? && !flag.used?
|
|
end
|
|
end
|