This commit is contained in:
r888888888
2017-09-14 11:07:14 -07:00
parent 7722cabe7c
commit c83a76ccce
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
class PoolsController < ApplicationController
respond_to :html, :xml, :json, :js
before_filter :member_only, :except => [:index, :show, :gallery]
before_filter :moderator_only, :only => [:destroy]
before_filter :builder_only, :only => [:destroy]
def new
@pool = Pool.new

View File

@@ -19,7 +19,7 @@ class Pool < ApplicationRecord
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, :moderator, :admin, :default]
attr_accessible :is_deleted, :as => [:moderator, :admin]
attr_accessible :is_deleted, :as => [:builder, :moderator, :admin]
module SearchMethods
def deleted
@@ -208,7 +208,7 @@ class Pool < ApplicationRecord
end
def deletable_by?(user)
user.is_moderator?
user.is_builder?
end
def create_mod_action_for_delete