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:
Sam Saffron
2020-05-26 10:07:00 +10:00
parent 979093787f
commit fc97f7e0e7
5 changed files with 31 additions and 23 deletions

View File

@ -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?