users: allow all users to use the posts per page setting.

This commit is contained in:
evazion
2020-03-21 23:04:12 -05:00
parent 88a8f459ed
commit f464163885
3 changed files with 1 additions and 16 deletions

View File

@@ -78,7 +78,6 @@ class User < ApplicationRecord
validates_presence_of :comment_threshold
validate :validate_sock_puppets, :on => :create, :if => -> { Danbooru.config.enable_sock_puppet_validation? }
before_validation :normalize_blacklisted_tags
before_validation :set_per_page
before_create :encrypt_password_on_create
before_update :encrypt_password_on_update
before_create :promote_to_admin_if_first_user
@@ -349,12 +348,6 @@ class User < ApplicationRecord
def is_approver?
can_approve_posts?
end
def set_per_page
if per_page.nil? || !is_gold?
self.per_page = Danbooru.config.posts_per_page
end
end
end
module EmailMethods