Commit 821248dd authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 364293: Do not call can_see_product() from templates - Patch by Fré©ric…

Bug 364293: Do not call can_see_product() from templates - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=bkor a=justdave
parent 1a40b1fe
...@@ -44,8 +44,8 @@ var tms = new Array(); ...@@ -44,8 +44,8 @@ var tms = new Array();
[% FOREACH c = classification %] [% FOREACH c = classification %]
prods[[% nclass FILTER js %]] = [ prods[[% nclass FILTER js %]] = [
[% sep = '' %] [% sep = '' %]
[%- FOREACH item = c.products -%] [%- FOREACH item = user.get_selectable_products(c.id) -%]
[%- IF user.can_see_product(item.name) && item.components.size -%] [%- IF item.components.size -%]
[%- sep FILTER js %]'[% item.name FILTER js %]' [%- sep FILTER js %]'[% item.name FILTER js %]'
[%- sep = ',' -%] [%- sep = ',' -%]
[%- END -%] [%- END -%]
......
...@@ -73,8 +73,8 @@ for "crash secure SSL flash". ...@@ -73,8 +73,8 @@ for "crash secure SSL flash".
[% IF Param('useclassification') %] [% IF Param('useclassification') %]
[% FOREACH c = classification %] [% FOREACH c = classification %]
<optgroup label="[% c.name FILTER html %]"> <optgroup label="[% c.name FILTER html %]">
[% FOREACH p = c.products %] [% FOREACH p = user.get_selectable_products(c.id) %]
[% IF user.can_see_product(p.name) && p.components.size %] [% IF p.components.size %]
<option value="[% p.name FILTER html %]" <option value="[% p.name FILTER html %]"
[% " selected" IF lsearch(default.product, p.name) != -1 %]> [% " selected" IF lsearch(default.product, p.name) != -1 %]>
[% p.name FILTER html %] [% p.name FILTER html %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment