Drop dmail filters.
Few people used dmail filters (~900 users in 5 years) and even fewer used them correctly. Most people used them to try to block dmail spam, but usually they either blocked too much (by adding common words that are present in nearly all dmails, causing all mails to them to be filtered) or too little (blocking specific email addresses or urls, which usually are never seen again after the spammer is banned). Nowadays the spam detection system does a better job of filtering spam.
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
module Maintenance
|
||||
module User
|
||||
class DmailFiltersController < ApplicationController
|
||||
before_action :ensure_ownership
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
def edit
|
||||
@dmail_filter = CurrentUser.dmail_filter || DmailFilter.new
|
||||
end
|
||||
|
||||
def update
|
||||
@dmail_filter = CurrentUser.dmail_filter || DmailFilter.new
|
||||
@dmail_filter.update(dmail_filter_params)
|
||||
flash[:notice] = "Filter updated"
|
||||
respond_with(@dmail)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ensure_ownership
|
||||
@dmail = Dmail.find(params[:dmail_id])
|
||||
|
||||
if @dmail.owner_id != CurrentUser.user.id
|
||||
raise ::User::PrivilegeError.new
|
||||
end
|
||||
end
|
||||
|
||||
def dmail_filter_params
|
||||
params.require(:dmail_filter).permit(:words)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user