don't allow privileged tags to be filtered
This commit is contained in:
parent
39bb9b77de
commit
058cf16863
|
@ -14,7 +14,8 @@ class FiltersController < ApplicationController
|
|||
new_filters = []
|
||||
|
||||
params.each do |k,v|
|
||||
if (m = k.match(/^tag_(.+)$/)) && v.to_i == 1 && Tag.find_by_tag(m[1])
|
||||
if (m = k.match(/^tag_(.+)$/)) && v.to_i == 1 &&
|
||||
(t = Tag.find_by_tag(m[1])) && t.valid_for?(@user)
|
||||
new_filters.push m[1]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue