* All users can now view deleted posts.

* Posts now have an is_banned flag for artist removal requests.  Basic users can not view banned posts but gold and higher can.
* Banning an artist both deletes the post and bans it.
* By default deleted posts are not filtered out of post searches at the sql level.
This commit is contained in:
albert
2013-03-22 09:38:53 -07:00
parent 733fa2dd7b
commit 6c54d89a36
9 changed files with 40 additions and 8 deletions

View File

@@ -173,7 +173,7 @@ class Artist < ActiveRecord::Base
rescue PostFlag::Error
# swallow
end
post.delete!
post.delete!(:ban => true)
end
rescue Post::SearchError
# swallow

View File

@@ -777,6 +777,7 @@ class Post < ActiveRecord::Base
update_column(:is_deleted, true)
update_column(:is_pending, false)
update_column(:is_flagged, false)
update_column(:is_banned, true) if options[:ban]
give_favorites_to_parent
update_children_on_destroy
update_parent_on_destroy