fixes for platinum account references
This commit is contained in:
@@ -48,7 +48,7 @@ protected
|
||||
end
|
||||
end
|
||||
|
||||
%w(member banned privileged contributor janitor moderator admin).each do |level|
|
||||
%w(member banned privileged platinum contributor janitor moderator admin).each do |level|
|
||||
define_method("#{level}_only") do
|
||||
if CurrentUser.user.__send__("is_#{level}?")
|
||||
true
|
||||
|
||||
@@ -12,7 +12,7 @@ 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"
|
||||
accepts_nested_attributes_for :wiki_page
|
||||
attr_accessible :body, :name, :url_string, :other_names, :group_name, :wiki_page_attributes, :notes, :is_active, :as => [:member, :privileged, :contributor, :janitor, :moderator, :default, :admin]
|
||||
attr_accessible :body, :name, :url_string, :other_names, :group_name, :wiki_page_attributes, :notes, :is_active, :as => [:member, :privileged, :platinum, :contributor, :janitor, :moderator, :default, :admin]
|
||||
attr_accessible :is_banned, :as => :admin
|
||||
|
||||
module UrlMethods
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class ForumPost < ActiveRecord::Base
|
||||
attr_accessible :body, :topic_id, :as => [:member, :privileged, :contributor, :janitor, :admin, :moderator, :default]
|
||||
attr_accessible :body, :topic_id, :as => [:member, :privileged, :platinum, :contributor, :janitor, :admin, :moderator, :default]
|
||||
attr_accessible :is_locked, :is_sticky, :is_deleted, :as => [:admin, :moderator]
|
||||
belongs_to :creator, :class_name => "User"
|
||||
belongs_to :topic, :class_name => "ForumTopic"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class ForumTopic < ActiveRecord::Base
|
||||
attr_accessible :title, :original_post_attributes, :as => [:member, :privileged, :contributor, :janitor, :moderator, :admin, :default]
|
||||
attr_accessible :title, :original_post_attributes, :as => [:member, :privileged, :platinum, :contributor, :janitor, :moderator, :admin, :default]
|
||||
attr_accessible :is_sticky, :is_locked, :is_deleted, :as => [:janitor, :admin, :moderator]
|
||||
belongs_to :creator, :class_name => "User"
|
||||
belongs_to :updater, :class_name => "User"
|
||||
|
||||
@@ -12,7 +12,7 @@ class Pool < ActiveRecord::Base
|
||||
before_validation :initialize_creator, :on => :create
|
||||
after_save :create_version
|
||||
before_destroy :create_mod_action_for_destroy
|
||||
attr_accessible :name, :description, :post_ids, :post_id_array, :post_count, :is_active, :as => [:member, :privileged, :contributor, :janitor, :moderator, :admin, :default]
|
||||
attr_accessible :name, :description, :post_ids, :post_id_array, :post_count, :is_active, :as => [:member, :privileged, :platinum, :contributor, :janitor, :moderator, :admin, :default]
|
||||
attr_accessible :is_deleted, :as => [:janitor, :moderator, :admin]
|
||||
|
||||
module SearchMethods
|
||||
|
||||
@@ -30,7 +30,7 @@ class Post < ActiveRecord::Base
|
||||
validates_uniqueness_of :md5
|
||||
validates_presence_of :parent, :if => lambda {|rec| !rec.parent_id.nil?}
|
||||
validate :validate_parent_does_not_have_a_parent
|
||||
attr_accessible :source, :rating, :tag_string, :old_tag_string, :last_noted_at, :parent_id, :as => [:member, :privileged, :contributor, :janitor, :moderator, :admin, :default]
|
||||
attr_accessible :source, :rating, :tag_string, :old_tag_string, :last_noted_at, :parent_id, :as => [:member, :privileged, :platinum, :contributor, :janitor, :moderator, :admin, :default]
|
||||
attr_accessible :is_rating_locked, :is_note_locked, :as => [:janitor, :moderator, :admin]
|
||||
attr_accessible :is_status_locked, :as => [:admin]
|
||||
|
||||
|
||||
@@ -49,6 +49,18 @@
|
||||
<td>Yes</td>
|
||||
<td>Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>See Deleted Posts</td>
|
||||
<td>No</td>
|
||||
<td>Yes</td>
|
||||
<td>Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>See Censored Tags</td>
|
||||
<td>No</td>
|
||||
<td>Yes</td>
|
||||
<td>Yes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user