]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 419191: CC'ed users not being in the group a bug is restricted to cannot do any...
authorlpsolit%gmail.com <>
Tue, 26 Feb 2008 06:09:32 +0000 (06:09 +0000)
committerlpsolit%gmail.com <>
Tue, 26 Feb 2008 06:09:32 +0000 (06:09 +0000)
template/en/default/bug/edit.html.tmpl

index 1cdf5e7988a7a226f613c4899b1a84fa9f8c3d82..3516500f548469724388cb66efee9e8de2d11ed6 100644 (file)
 [%############################################################################%]
 
 [% BLOCK section_restrict_visibility %]
-  [% IF bug.groups.size > 0 %]
+  [% RETURN UNLESS bug.groups.size %]
   <table>
     <tr>
       <td class="field_label">
         [% FOREACH group = bug.groups %]
           [% SET inallgroups = 0 IF NOT group.ingroup %]
           [% SET inagroup = 1 IF group.ison %]
-    
-          [% IF NOT group.mandatory %]
-            [% IF NOT emitted_description %]
-              [% emitted_description = 1 %]
-              <div id="bz_restrict_group_visibility_help">
-                <b>Only users in all of the selected groups can view this [% terms.bug %]:</b>
-                <br>
-                <font size="-1">
-                  (Unchecking all boxes makes this a more public [% terms.bug %].)
-                </font>
-              </div>
-            [% END %]
-    
+
+          [% NEXT IF group.mandatory %]
+
+          [% IF NOT emitted_description %]
+            [% emitted_description = 1 %]
+            <div id="bz_restrict_group_visibility_help">
+              <b>Only users in all of the selected groups can view this [% terms.bug %]:</b>
+              <br>
+              <font size="-1">
+                (Unchecking all boxes makes this a more public [% terms.bug %].)
+              </font>
+            </div>
+          [% END %]
+
           [% IF group.ingroup %]
             <input type="hidden" name="defined_bit-[% group.bit %]" value="1">
           [% END %]
                  [% " disabled=\"disabled\"" IF NOT group.ingroup %]>
           <label for="bit-[% group.bit %]">[% group.description FILTER html_light %]</label>
           <br>
-          [% END %]
         [% END %]
-    
+
         [% IF NOT inallgroups %]
           <b>
             Only members of a group can change the visibility of [% terms.abug %] for
             that group.
           </b>
-        <br>
+          <br>
         [% END %]
       </td>
     </tr>
+
     [% IF inagroup %]
     <tr>
       <td class="field_label">
         </div>
         <div>
           <div>
-            <input type="hidden" name="defined_reporter_accessible" value="1">
+            [% user_can_edit_accessible = bug.check_can_change_field("reporter_accessible", 0, 1) %]
+            [% IF user_can_edit_accessible %]
+              <input type="hidden" name="defined_reporter_accessible" value="1">
+            [% END %]
             <input type="checkbox" value="1"
                    name="reporter_accessible" id="reporter_accessible"
                    [% " checked" IF bug.reporter_accessible %]
-                   [% " disabled=\"disabled\"" UNLESS bug.check_can_change_field("reporter_accessible", 0, 1) %]>
+                   [% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]>
             <label for="reporter_accessible">Reporter</label>
           </div>
           <div>
-            <input type="hidden" name="defined_cclist_accessible" value="1">
+            [% user_can_edit_accessible = bug.check_can_change_field("cclist_accessible", 0, 1) %]
+            [% IF user_can_edit_accessible %]
+              <input type="hidden" name="defined_cclist_accessible" value="1">
+            [% END %]
             <input type="checkbox" value="1"
                    name="cclist_accessible" id="cclist_accessible"
                    [% " checked" IF bug.cclist_accessible %]
-                   [% " disabled=\"disabled\"" UNLESS bug.check_can_change_field("cclist_accessible", 0, 1) %]>
+                   [% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]>
             <label for="cclist_accessible">CC List</label>
           </div>
         </div>
     </tr>
     [% END %]
   </table>  
-  [% END %]
 [% END %]
 
 [%############################################################################%]