From 1f9c83ae81c5c81d005fa0d9a428e23ea5126576 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Tue, 18 Oct 2005 04:19:00 +0000 Subject: Bug 309681 Prevent users from adding another user who shouldn't have access to a bug as assignee or CC member Patch by Gabriel Sales de Oliveira r=joel, a=justdave --- globals.pl | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'globals.pl') diff --git a/globals.pl b/globals.pl index 07d12a984..ebbce4c16 100644 --- a/globals.pl +++ b/globals.pl @@ -372,27 +372,6 @@ sub AnyDefaultGroups { return $::CachedAnyDefaultGroups; } -# -# This function checks if, given a product id, the user can edit -# bugs in this product at all. -sub CanEditProductId { - my ($productid) = @_; - my $dbh = Bugzilla->dbh; - my $query = "SELECT group_id FROM group_control_map " . - "WHERE product_id = $productid " . - "AND canedit != 0 "; - if (%{Bugzilla->user->groups}) { - $query .= "AND group_id NOT IN(" . - join(',', values(%{Bugzilla->user->groups})) . ") "; - } - $query .= $dbh->sql_limit(1); - PushGlobalSQLState(); - SendSQL($query); - my ($result) = FetchSQLData(); - PopGlobalSQLState(); - return (!defined($result)); -} - sub IsInClassification { my ($classification,$productname) = @_; -- cgit v1.2.3-24-g4f1b