diff --git a/app/models/pool.rb b/app/models/pool.rb index 197d280fa..c42c82738 100644 --- a/app/models/pool.rb +++ b/app/models/pool.rb @@ -7,7 +7,6 @@ class Pool < ApplicationRecord validates_uniqueness_of :name, case_sensitive: false, if: :name_changed? validate :validate_name, if: :name_changed? validates_inclusion_of :category, :in => %w(series collection) - validate :updater_can_remove_posts validate :updater_can_edit_deleted before_validation :normalize_post_ids before_validation :normalize_name @@ -173,7 +172,6 @@ class Pool < ApplicationRecord def remove!(post) return unless contains?(post.id) - return unless CurrentUser.user.can_remove_from_pools? with_lock do reload @@ -276,11 +274,4 @@ class Pool < ApplicationRecord errors[:name] << "cannot contain only digits" end end - - def updater_can_remove_posts - removed = post_ids_was - post_ids - if removed.any? && !CurrentUser.user.can_remove_from_pools? - errors[:base] << "You cannot removes posts from pools within the first week of sign up" - end - end end diff --git a/app/models/post.rb b/app/models/post.rb index 951e83fab..2b9881f20 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -1011,7 +1011,6 @@ class Post < ApplicationRecord def remove_pool!(pool) return unless belongs_to_pool?(pool) - return unless CurrentUser.user.can_remove_from_pools? with_lock do self.pool_string = pool_string.gsub(/(?:\A| )pool:#{pool.id}(?:\Z| )/, " ").strip diff --git a/app/models/user.rb b/app/models/user.rb index 605c3e572..2cfd430e5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -414,10 +414,6 @@ class User < ApplicationRecord CommentVote.where("user_id = ? and created_at > ?", id, 1.hour.ago).count < 10 end - def can_remove_from_pools? - created_at <= 1.week.ago - end - def upload_limit @upload_limit ||= UploadLimit.new(self) end @@ -509,7 +505,7 @@ class User < ApplicationRecord custom_style favorite_count api_regen_multiplier api_burst_limit remaining_api_limit statement_timeout favorite_group_limit favorite_limit tag_query_limit - can_remove_from_pools? is_comment_limited? + is_comment_limited? can_comment? max_saved_searches theme ] end