From dedbe7d00c18c44bfe3ddd9cda8171e6ba599a89 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 25 Feb 2005 11:07:05 +0000 Subject: Bug 279693: Move UserCanBlessGroup() into a Bugzilla::User function Patch By Max Kanat-Alexander r=LpSolit, a=myk --- globals.pl | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'globals.pl') diff --git a/globals.pl b/globals.pl index 2d01cb5f1..1bfbe2306 100644 --- a/globals.pl +++ b/globals.pl @@ -1033,36 +1033,6 @@ sub UserInGroup { return defined Bugzilla->user->groups->{$_[0]}; } -sub UserCanBlessGroup { - my ($groupname) = (@_); - PushGlobalSQLState(); - # check if user explicitly can bless group - SendSQL("SELECT groups.id FROM groups, user_group_map - WHERE groups.id = user_group_map.group_id - AND user_group_map.user_id = $::userid - AND isbless = 1 - AND groups.name = " . SqlQuote($groupname)); - my $result = FetchOneColumn(); - PopGlobalSQLState(); - if ($result) { - return 1; - } - PushGlobalSQLState(); - # check if user is a member of a group that can bless this group - # this group does not count - SendSQL("SELECT groups.id FROM groups, user_group_map, - group_group_map - WHERE groups.id = grantor_id - AND user_group_map.user_id = $::userid - AND user_group_map.isbless = 0 - AND group_group_map.grant_type = " . GROUP_BLESS . " - AND user_group_map.group_id = member_id - AND groups.name = " . SqlQuote($groupname)); - $result = FetchOneColumn(); - PopGlobalSQLState(); - return $result; -} - sub BugInGroupId { my ($bugid, $groupid) = (@_); PushGlobalSQLState(); -- cgit v1.2.3-24-g4f1b