diff --git a/app/models/forum_post.rb b/app/models/forum_post.rb index d53dd041a..a8a05f3e9 100644 --- a/app/models/forum_post.rb +++ b/app/models/forum_post.rb @@ -104,7 +104,7 @@ class ForumPost < ActiveRecord::Base end def hidden_attributes - [:text_index] + super + [:text_index] end end diff --git a/app/models/forum_topic.rb b/app/models/forum_topic.rb index 2348535ad..344fe6c66 100644 --- a/app/models/forum_topic.rb +++ b/app/models/forum_topic.rb @@ -178,7 +178,7 @@ class ForumTopic < ActiveRecord::Base end def hidden_attributes - [:text_index, :min_level] + super + [:text_index, :min_level] end def merge(topic) diff --git a/app/models/post.rb b/app/models/post.rb index 21620e6cd..a114c3b41 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -1469,7 +1469,7 @@ class Post < ActiveRecord::Base module ApiMethods def hidden_attributes - list = [:tag_index] + list = super + [:tag_index] if !visible? list += [:md5, :file_ext] end @@ -1477,7 +1477,7 @@ class Post < ActiveRecord::Base end def method_attributes - list = [:uploader_name, :has_large, :tag_string_artist, :tag_string_character, :tag_string_copyright, :tag_string_general, :has_visible_children] + list = super + [:uploader_name, :has_large, :tag_string_artist, :tag_string_character, :tag_string_copyright, :tag_string_general, :has_visible_children] if visible? list += [:file_url, :large_file_url, :preview_file_url] end diff --git a/app/models/post_flag.rb b/app/models/post_flag.rb index 1467be852..d2f42364e 100644 --- a/app/models/post_flag.rb +++ b/app/models/post_flag.rb @@ -79,7 +79,7 @@ class PostFlag < ActiveRecord::Base module ApiMethods def hidden_attributes - list = [] + list = super unless CurrentUser.is_moderator? list += [:creator_id] end