mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
- FEATURE: revamped poll plugin
- add User.staff scope - inject MessageBus into Ember views (so it can be used by the poll plugin) - REFACTOR: use more accurate is_first_post? method instead of post_number == 1 - FEATURE: add support for JSON-typed custom fields - FEATURE: allow plugins to add validation - FEATURE: add post_custom_fields to PostSerializer - FEATURE: allow plugins to whitelist post_custom_fields - FIX: don't bump when post did not save successfully - FEATURE: polls are supported in any post - FEATURE: allow for multiple polls in the same post - FEATURE: multiple choice polls - FEATURE: rating polls - FEATURE: new dialect allowing users to preview polls in the composer
This commit is contained in:
@@ -116,7 +116,7 @@ module PostGuardian
|
||||
# Deleting Methods
|
||||
def can_delete_post?(post)
|
||||
# Can't delete the first post
|
||||
return false if post.post_number == 1
|
||||
return false if post.is_first_post?
|
||||
|
||||
# Can't delete after post_edit_time_limit minutes have passed
|
||||
return false if !is_staff? && post.edit_time_limit_expired?
|
||||
|
||||
Reference in New Issue
Block a user