mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00: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
|