diff --git a/app/assets/stylesheets/common/user_styles.scss b/app/assets/stylesheets/common/user_styles.scss index 225eb8935..0ee75aae1 100644 --- a/app/assets/stylesheets/common/user_styles.scss +++ b/app/assets/stylesheets/common/user_styles.scss @@ -6,10 +6,6 @@ a.user-moderator.with-style { color: orange; } -a.user-janitor.with-style { - color: green; -} - a.user-contributor.with-style { color: purple; } diff --git a/app/helpers/admin/users_helper.rb b/app/helpers/admin/users_helper.rb index e078bf9f2..7f01da02c 100644 --- a/app/helpers/admin/users_helper.rb +++ b/app/helpers/admin/users_helper.rb @@ -5,7 +5,6 @@ module Admin::UsersHelper ["Gold", User::Levels::GOLD], ["Platinum", User::Levels::PLATINUM], ["Builder", User::Levels::BUILDER], - ["Janitor", User::Levels::JANITOR], ["Moderator", User::Levels::MODERATOR], ["Admin", User::Levels::ADMIN] ] diff --git a/app/helpers/moderator/dashboards_helper.rb b/app/helpers/moderator/dashboards_helper.rb index ea966ad41..b85cfbfef 100644 --- a/app/helpers/moderator/dashboards_helper.rb +++ b/app/helpers/moderator/dashboards_helper.rb @@ -6,7 +6,6 @@ module Moderator ["Member", 20], ["Gold", 30], ["Platinum", 31], - ["Janitor", 35], ["Moderator", 40], ["Admin", 50] ] diff --git a/app/logical/anonymous_user.rb b/app/logical/anonymous_user.rb index e2f565f46..f647d8f87 100644 --- a/app/logical/anonymous_user.rb +++ b/app/logical/anonymous_user.rb @@ -257,7 +257,7 @@ class AnonymousUser false end - %w(member banned gold builder platinum janitor moderator admin).each do |name| + %w(member banned gold builder platinum moderator admin).each do |name| define_method("is_#{name}?") do false end diff --git a/app/models/artist.rb b/app/models/artist.rb index 5d760f10b..f6cbcd120 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -17,8 +17,8 @@ class Artist < ActiveRecord::Base has_one :wiki_page, :foreign_key => "title", :primary_key => "name" has_one :tag_alias, :foreign_key => "antecedent_name", :primary_key => "name" has_one :tag, :foreign_key => "name", :primary_key => "name" - attr_accessible :body, :notes, :name, :url_string, :other_names, :other_names_comma, :group_name, :notes, :as => [:member, :gold, :builder, :platinum, :janitor, :moderator, :default, :admin] - attr_accessible :is_active, :as => [:builder, :janitor, :moderator, :default, :admin] + attr_accessible :body, :notes, :name, :url_string, :other_names, :other_names_comma, :group_name, :notes, :as => [:member, :gold, :builder, :platinum, :moderator, :default, :admin] + attr_accessible :is_active, :as => [:builder, :moderator, :default, :admin] attr_accessible :is_banned, :as => :admin scope :active, lambda { where(is_active: true) } diff --git a/app/models/comment.rb b/app/models/comment.rb index c48acfb7c..de2a36dee 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -18,7 +18,7 @@ class Comment < ActiveRecord::Base after_update(:if => lambda {|rec| rec.is_deleted? && rec.is_deleted_changed? && CurrentUser.id != rec.creator_id}) do |rec| ModAction.log("comment ##{rec.id} deleted by #{CurrentUser.name}") end - attr_accessible :body, :post_id, :do_not_bump_post, :is_deleted, :as => [:member, :gold, :platinum, :builder, :janitor, :moderator, :admin] + attr_accessible :body, :post_id, :do_not_bump_post, :is_deleted, :as => [:member, :gold, :platinum, :builder, :moderator, :admin] attr_accessible :is_sticky, :as => [:moderator, :admin] mentionable( :message_field => :body, diff --git a/app/models/dmail_filter.rb b/app/models/dmail_filter.rb index eb1c39df3..732be2692 100644 --- a/app/models/dmail_filter.rb +++ b/app/models/dmail_filter.rb @@ -1,6 +1,6 @@ class DmailFilter < ActiveRecord::Base belongs_to :user - attr_accessible :words, :as => [:moderator, :janitor, :gold, :platinum, :member, :anonymous, :default, :builder, :admin] + attr_accessible :words, :as => [:moderator, :gold, :platinum, :member, :anonymous, :default, :builder, :admin] validates_presence_of :user before_validation :initialize_user diff --git a/app/models/favorite_group.rb b/app/models/favorite_group.rb index fceec52f1..aa0b86abc 100644 --- a/app/models/favorite_group.rb +++ b/app/models/favorite_group.rb @@ -11,7 +11,7 @@ class FavoriteGroup < ActiveRecord::Base validate :creator_can_create_favorite_groups, :on => :create validate :validate_number_of_posts before_save :update_post_count - attr_accessible :name, :post_ids, :post_id_array, :as => [:member, :gold, :platinum, :builder, :janitor, :moderator, :admin, :default] + attr_accessible :name, :post_ids, :post_id_array, :as => [:member, :gold, :platinum, :builder, :moderator, :admin, :default] module SearchMethods def for_creator(user_id) diff --git a/app/models/forum_post.rb b/app/models/forum_post.rb index a6b47c852..da07ca6a8 100644 --- a/app/models/forum_post.rb +++ b/app/models/forum_post.rb @@ -1,7 +1,7 @@ class ForumPost < ActiveRecord::Base include Mentionable - attr_accessible :body, :topic_id, :as => [:member, :builder, :janitor, :gold, :platinum, :admin, :moderator, :default] + attr_accessible :body, :topic_id, :as => [:member, :builder, :gold, :platinum, :admin, :moderator, :default] attr_accessible :is_locked, :is_sticky, :is_deleted, :as => [:admin, :moderator] attr_readonly :topic_id belongs_to :creator, :class_name => "User" diff --git a/app/models/forum_topic.rb b/app/models/forum_topic.rb index 44360422a..e912c7b7c 100644 --- a/app/models/forum_topic.rb +++ b/app/models/forum_topic.rb @@ -11,7 +11,7 @@ class ForumTopic < ActiveRecord::Base Admin: User::Levels::ADMIN, } - attr_accessible :title, :original_post_attributes, :category_id, :as => [:member, :builder, :gold, :platinum, :janitor, :moderator, :admin, :default] + attr_accessible :title, :original_post_attributes, :category_id, :as => [:member, :builder, :gold, :platinum, :moderator, :admin, :default] attr_accessible :is_sticky, :is_locked, :is_deleted, :min_level, :as => [:admin, :moderator] belongs_to :creator, :class_name => "User" belongs_to :updater, :class_name => "User" diff --git a/app/models/pool.rb b/app/models/pool.rb index 2254c675e..d051689d6 100644 --- a/app/models/pool.rb +++ b/app/models/pool.rb @@ -20,7 +20,7 @@ class Pool < ActiveRecord::Base after_save :create_version after_create :synchronize! before_destroy :create_mod_action_for_destroy - attr_accessible :name, :description, :post_ids, :post_id_array, :post_count, :is_active, :category, :as => [:member, :gold, :platinum, :janitor, :moderator, :admin, :default] + attr_accessible :name, :description, :post_ids, :post_id_array, :post_count, :is_active, :category, :as => [:member, :gold, :platinum, :moderator, :admin, :default] attr_accessible :is_deleted, :as => [:moderator, :admin] module SearchMethods diff --git a/app/models/post.rb b/app/models/post.rb index 2625f3879..b5daed3bf 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -54,8 +54,8 @@ class Post < ActiveRecord::Base has_many :versions, lambda {order("post_versions.updated_at ASC")}, :class_name => "PostArchive", :dependent => :destroy end - attr_accessible :source, :rating, :tag_string, :old_tag_string, :old_parent_id, :old_source, :old_rating, :parent_id, :has_embedded_notes, :as => [:member, :builder, :gold, :platinum, :janitor, :moderator, :admin, :default] - attr_accessible :is_rating_locked, :is_note_locked, :as => [:builder, :janitor, :moderator, :admin] + attr_accessible :source, :rating, :tag_string, :old_tag_string, :old_parent_id, :old_source, :old_rating, :parent_id, :has_embedded_notes, :as => [:member, :builder, :gold, :platinum, :moderator, :admin, :default] + attr_accessible :is_rating_locked, :is_note_locked, :as => [:builder, :moderator, :admin] attr_accessible :is_status_locked, :as => [:admin] attr_accessor :old_tag_string, :old_parent_id, :old_source, :old_rating, :has_constraints, :disable_versioning, :view_count diff --git a/app/models/tag.rb b/app/models/tag.rb index 303ad692b..8340588b1 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -2,7 +2,7 @@ class Tag < ActiveRecord::Base COSINE_SIMILARITY_RELATED_TAG_THRESHOLD = 1000 METATAGS = "-user|user|-approver|approver|commenter|comm|noter|noteupdater|artcomm|-pool|pool|ordpool|-favgroup|favgroup|-fav|fav|ordfav|sub|md5|-rating|rating|-locked|locked|width|height|mpixels|ratio|score|favcount|filesize|source|-source|id|-id|date|age|order|limit|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|-parent|child|pixiv_id|pixiv|search|upvote|downvote|filetype|-filetype" SUBQUERY_METATAGS = "commenter|comm|noter|noteupdater|artcomm" - attr_accessible :category, :as => [:moderator, :janitor, :gold, :platinum, :member, :anonymous, :default, :builder, :admin] + attr_accessible :category, :as => [:moderator, :gold, :platinum, :member, :anonymous, :default, :builder, :admin] attr_accessible :is_locked, :as => [:moderator, :admin] has_one :wiki_page, :foreign_key => "title", :primary_key => "name" has_one :antecedent_alias, lambda {active}, :class_name => "TagAlias", :foreign_key => "antecedent_name", :primary_key => "name" diff --git a/app/models/user.rb b/app/models/user.rb index 526570437..39ae290ea 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -11,7 +11,6 @@ class User < ActiveRecord::Base GOLD = 30 PLATINUM = 31 BUILDER = 32 - JANITOR = 35 MODERATOR = 40 ADMIN = 50 end @@ -52,7 +51,7 @@ class User < ActiveRecord::Base has_bit_flags BOOLEAN_ATTRIBUTES, :field => "bit_prefs" attr_accessor :password, :old_password - attr_accessible :dmail_filter_attributes, :enable_privacy_mode, :enable_post_navigation, :new_post_navigation_layout, :password, :old_password, :password_confirmation, :password_hash, :email, :last_logged_in_at, :last_forum_read_at, :has_mail, :receive_email_notifications, :comment_threshold, :always_resize_images, :favorite_tags, :blacklisted_tags, :name, :ip_addr, :time_zone, :default_image_size, :enable_sequential_post_navigation, :per_page, :hide_deleted_posts, :style_usernames, :enable_auto_complete, :custom_style, :show_deleted_children, :disable_categorized_saved_searches, :disable_tagged_filenames, :enable_recent_searches, :as => [:moderator, :janitor, :gold, :platinum, :member, :anonymous, :default, :builder, :admin] + attr_accessible :dmail_filter_attributes, :enable_privacy_mode, :enable_post_navigation, :new_post_navigation_layout, :password, :old_password, :password_confirmation, :password_hash, :email, :last_logged_in_at, :last_forum_read_at, :has_mail, :receive_email_notifications, :comment_threshold, :always_resize_images, :favorite_tags, :blacklisted_tags, :name, :ip_addr, :time_zone, :default_image_size, :enable_sequential_post_navigation, :per_page, :hide_deleted_posts, :style_usernames, :enable_auto_complete, :custom_style, :show_deleted_children, :disable_categorized_saved_searches, :disable_tagged_filenames, :enable_recent_searches, :as => [:moderator, :gold, :platinum, :member, :anonymous, :default, :builder, :admin] attr_accessible :level, :as => :admin validates :name, user_name: true, on: :create @@ -313,7 +312,6 @@ class User < ActiveRecord::Base "Gold" => Levels::GOLD, "Platinum" => Levels::PLATINUM, "Builder" => Levels::BUILDER, - "Janitor" => Levels::JANITOR, "Moderator" => Levels::MODERATOR, "Admin" => Levels::ADMIN } @@ -336,9 +334,6 @@ class User < ActiveRecord::Base when Levels::PLATINUM "Platinum" - when Levels::JANITOR - "Janitor" - when Levels::MODERATOR "Moderator" @@ -408,10 +403,6 @@ class User < ActiveRecord::Base level >= Levels::PLATINUM end - def is_janitor? - level >= Levels::JANITOR - end - def is_moderator? level >= Levels::MODERATOR end diff --git a/app/views/post_versions/index.html.erb b/app/views/post_versions/index.html.erb index 8303e0fe6..668001c96 100644 --- a/app/views/post_versions/index.html.erb +++ b/app/views/post_versions/index.html.erb @@ -7,7 +7,7 @@ <% else %> <%= render "listing", :post_versions => @post_versions %> - <% if params[:lr] && CurrentUser.is_janitor? %> + <% if params[:lr] && CurrentUser.is_moderator? %>
<%= link_to "Revert this user's changes", new_user_revert_path(:user_id => params[:lr]) %>
<% end %> diff --git a/app/views/report_mailer/moderator_report.html.erb b/app/views/report_mailer/moderator_report.html.erb deleted file mode 100644 index 7ca1f25aa..000000000 --- a/app/views/report_mailer/moderator_report.html.erb +++ /dev/null @@ -1,35 +0,0 @@ - - - -| Name | -Level | -Appr 1 | -Appr 7 | -Appr 14 | -Comm | -Forum | -
|---|---|---|---|---|---|---|
| <%= link_to user.name, user_path(user, :host => Danbooru.config.hostname, :only_path => false) %> | -<%= user.pretty_level %> | -<%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 1.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 1.days.ago]) %> | -<%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 7.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 7.days.ago]) %> | -<%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 14.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 14.days.ago]) %> | -<%= Comment.count(:conditions => ["created_at >= ? AND user_id = ?", 7.days.ago, user.id]) %> | -<%= ForumPost.count(:conditions => ["created_at >= ? AND creator_id = ?", 7.days.ago, user.id]) %> | -