]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 312787 When strict_isolation is set, do not permit users to alter deps on bugs...
authorbugreport%peshkin.net <>
Sat, 22 Oct 2005 20:07:05 +0000 (20:07 +0000)
committerbugreport%peshkin.net <>
Sat, 22 Oct 2005 20:07:05 +0000 (20:07 +0000)
Patch by Joel Peshkin <bugreport@peshkin.net>
r=kiko, a=justdave

process_bug.cgi
template/en/default/admin/params/groupsecurity.html.tmpl
template/en/default/global/user-error.html.tmpl

index adb6a3deda943c4405f320954a4932708be98e9d..dc119179cf3523fb9df6f45a7da24fdcb1501754 100755 (executable)
@@ -165,6 +165,13 @@ foreach my $field ("dependson", "blocked") {
                 $vars->{'field'} = $field;
                 ThrowUserError("illegal_change", $vars);
             }
+            if (Param("strict_isolation")) {
+                my $deltabug = new Bugzilla::Bug($id, $user);
+                if (!$user->can_edit_product($deltabug->{'product_id'})) {
+                    $vars->{'field'} = $field;
+                    ThrowUserError("illegal_change_deps", $vars);
+                }
+            }
         }
     } else {
         # Bugzilla does not support mass-change of dependencies so they
index d4e219a88bead414937a21dce7b551d2b4f3066b..9016a7038c61be5794b09449b37cf1ba410d42d7 100644 (file)
   usevisibilitygroups => "Do you wish to restrict visibility of users to members of " _
                          "specific groups?",
   
-  strict_isolation => "Don't allow users to assign, be qa-contacts or add to CC list " _
-                      "any user that do not have permission to edit the bug." }
+  strict_isolation => "Don't allow users to be assigned to, " _
+                      "be qa-contacts on, " _
+                      "be added to CC list, " _
+                      "or make or remove dependencies " _
+                      "involving any bug that is in a product on which that " _
+                      "user is forbidden to edit.", 
+
+ }
 %]
index 334f1c54e8f0c2199b8bfaefb9f51857e234f9a7..f0c8288880ac998c561385e76dc9c23622b8e041 100644 (file)
     [% END %]
     a sufficiently empowered user may change that field.
 
+  [% ELSIF error == "illegal_change_deps" %]
+    [% title = "Not allowed" %]
+    You tried to change the 
+    <strong>[% field_descs.$field FILTER html %]</strong> field 
+    but only a user empowered to edit 
+    both involved [% terms.bugs %] may change that field.
+
   [% ELSIF error == "illegal_changed_in_last_x_days" %]
     [% title = "Your Search Makes No Sense" %]
     The <em>Changed in last ___ days</em> field must be a simple number.