diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-07-12 13:04:27 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-07-13 08:21:15 +0100 |
commit | 088bc961328f4d876971994102cde52c1ad49246 (patch) | |
tree | 26ded6a4940a23f898a688ea0b6041a21f455a53 /app/controllers/admin_censor_rule_controller.rb | |
parent | 39fdae7de23244b47581c197e1d78506aebf5af1 (diff) |
Support regular expressions in CensorRules; also support 'global' CensorRules that aren't attached to a User or Request or Public Body (but don't expose this in the admin UI). Fixes #33
Diffstat (limited to 'app/controllers/admin_censor_rule_controller.rb')
-rw-r--r-- | app/controllers/admin_censor_rule_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/admin_censor_rule_controller.rb b/app/controllers/admin_censor_rule_controller.rb index 52df8dfc1..ec86cdf8e 100644 --- a/app/controllers/admin_censor_rule_controller.rb +++ b/app/controllers/admin_censor_rule_controller.rb @@ -31,6 +31,8 @@ class AdminCensorRuleController < AdminController redirect_to admin_url('request/show/' + @censor_rule.info_request.id.to_s) elsif !@censor_rule.user.nil? redirect_to admin_url('user/show/' + @censor_rule.user.id.to_s) + elsif @censor_rule.regexp? + redirect_to admin_url('') else raise "internal error" end |