diff options
author | 2005-02-25 11:07:05 +0000 | |
---|---|---|
committer | 2005-02-25 11:07:05 +0000 | |
commit | dedbe7d00c18c44bfe3ddd9cda8171e6ba599a89 (patch) | |
tree | 5e04ee2e2da860b55bebbcc1463222256d57197f /globals.pl | |
parent | Bug 282074: Software error instead of Bugzilla's "Internal Error" Message (diff) | |
download | bugzilla-dedbe7d00c18c44bfe3ddd9cda8171e6ba599a89.tar.gz bugzilla-dedbe7d00c18c44bfe3ddd9cda8171e6ba599a89.tar.bz2 bugzilla-dedbe7d00c18c44bfe3ddd9cda8171e6ba599a89.zip |
Bug 279693: Move UserCanBlessGroup() into a Bugzilla::User function
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=LpSolit, a=myk
Diffstat (limited to 'globals.pl')
-rw-r--r-- | globals.pl | 30 |
1 files changed, 0 insertions, 30 deletions
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(); |