mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: properly ban non human users from draft system
Previously we had a partial fix in place where non human users were not allowed draft sequences, this left edges around where non human users asked for drafts yet had none. For example system could already have a few drafts in place. This also removes and extensibility point we added that is not in use
This commit is contained in:
@ -306,8 +306,12 @@ class User < ActiveRecord::Base
|
||||
fields.uniq
|
||||
end
|
||||
|
||||
def self.human_user_id?(user_id)
|
||||
user_id > 0
|
||||
end
|
||||
|
||||
def human?
|
||||
self.id > 0
|
||||
User.human_user_id?(self.id)
|
||||
end
|
||||
|
||||
def bot?
|
||||
|
Reference in New Issue
Block a user