fixes #3007: Eliminate Janitor role
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user