mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 16:02:46 +08:00
7aff9806eb
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
|