remove fav_string from posts api unless user is moderator (fixes #3633)
This commit is contained in:
@@ -1468,6 +1468,9 @@ class Post < ApplicationRecord
|
|||||||
module ApiMethods
|
module ApiMethods
|
||||||
def hidden_attributes
|
def hidden_attributes
|
||||||
list = super + [:tag_index]
|
list = super + [:tag_index]
|
||||||
|
unless CurrentUser.is_moderator?
|
||||||
|
list += [:fav_string]
|
||||||
|
end
|
||||||
if !visible?
|
if !visible?
|
||||||
list += [:md5, :file_ext]
|
list += [:md5, :file_ext]
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user