mirror of
https://ghfast.top/https://github.com/discourse/discourse-shared-edits.git
synced 2026-07-15 11:17:01 +08:00
12 lines
293 B
Ruby
12 lines
293 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseSharedEdits
|
|
module GuardianExtension
|
|
extend ActiveSupport::Concern
|
|
|
|
def can_toggle_shared_edits?
|
|
SiteSetting.shared_edits_enabled && authenticated? &&
|
|
(is_staff? || @user.has_trust_level?(TrustLevel[4]))
|
|
end
|
|
end
|
|
end
|