mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Trust level 3 users can edit topic titles and change category
This commit is contained in:
+3
-1
@@ -80,7 +80,7 @@ class Guardian
|
||||
alias :can_see_flags? :can_moderate?
|
||||
alias :can_send_activation_email? :can_moderate?
|
||||
|
||||
|
||||
|
||||
|
||||
# Can we impersonate this user?
|
||||
def can_impersonate?(target)
|
||||
@@ -241,6 +241,8 @@ class Guardian
|
||||
if obj && authenticated?
|
||||
action_method = method_name_for action, obj
|
||||
return (action_method ? send(action_method, obj) : true)
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ module TopicGuardian
|
||||
|
||||
# Editing Method
|
||||
def can_edit_topic?(topic)
|
||||
!topic.archived && (is_staff? || is_my_own?(topic))
|
||||
!topic.archived && (is_staff? || is_my_own?(topic) || user.has_trust_level?(:leader))
|
||||
end
|
||||
|
||||
# Recovery Method
|
||||
|
||||
Reference in New Issue
Block a user