summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rwxr-xr-xBugzilla/Bug.pm4
-rw-r--r--Bugzilla/Search.pm12
-rw-r--r--Bugzilla/Series.pm2
-rw-r--r--Bugzilla/Template.pm3
-rw-r--r--Bugzilla/User.pm8
5 files changed, 9 insertions, 20 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 642a71d3f..c984c8a98 100755
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1266,7 +1266,7 @@ sub GetBugActivity {
my $suppjoins = "";
my $suppwhere = "";
if (Bugzilla->params->{"insidergroup"}
- && !UserInGroup(Bugzilla->params->{'insidergroup'}))
+ && !Bugzilla->user->in_group(Bugzilla->params->{'insidergroup'}))
{
$suppjoins = "LEFT JOIN attachments
ON attachments.attach_id = bugs_activity.attach_id";
@@ -1313,7 +1313,7 @@ sub GetBugActivity {
|| $fieldname eq 'deadline')
{
$activity_visible =
- UserInGroup(Bugzilla->params->{'timetrackinggroup'}) ? 1 : 0;
+ Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'}) ? 1 : 0;
} else {
$activity_visible = 1;
}
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 92ed27b80..d2d3b4978 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -578,7 +578,7 @@ sub init {
my $table = "longdescs_$chartid";
my $extra = "";
if (Bugzilla->params->{"insidergroup"}
- && !UserInGroup(Bugzilla->params->{"insidergroup"}))
+ && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{
$extra = "AND $table.isprivate < 1";
}
@@ -641,7 +641,7 @@ sub init {
my $table = "longdescs_$chartseq";
my $extra = "";
if (Bugzilla->params->{"insidergroup"}
- && !UserInGroup(Bugzilla->params->{"insidergroup"}))
+ && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{
$extra = "AND $table.isprivate < 1";
}
@@ -661,7 +661,7 @@ sub init {
my $table = "longdescs_$chartseq";
my $extra = "";
if (Bugzilla->params->{"insidergroup"}
- && !UserInGroup(Bugzilla->params->{"insidergroup"}))
+ && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{
$extra = "AND $table.isprivate < 1";
}
@@ -684,7 +684,7 @@ sub init {
my $table = "longdescs_$chartid";
my $extra = "";
if (Bugzilla->params->{"insidergroup"}
- && !UserInGroup(Bugzilla->params->{"insidergroup"}))
+ && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{
$extra = "AND $table.isprivate < 1";
}
@@ -793,7 +793,7 @@ sub init {
my $dtable = "attachdata_$chartid";
my $extra = "";
if (Bugzilla->params->{"insidergroup"}
- && !UserInGroup(Bugzilla->params->{"insidergroup"}))
+ && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{
$extra = "AND $atable.isprivate = 0";
}
@@ -807,7 +807,7 @@ sub init {
my $table = "attachments_$chartid";
my $extra = "";
if (Bugzilla->params->{"insidergroup"}
- && !UserInGroup(Bugzilla->params->{"insidergroup"}))
+ && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{
$extra = "AND $table.isprivate = 0";
}
diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm
index 011e60168..877f69866 100644
--- a/Bugzilla/Series.pm
+++ b/Bugzilla/Series.pm
@@ -164,7 +164,7 @@ sub initFromCGI {
# Change 'admin' here and in series.html.tmpl, or remove the check
# completely, if you want to change who can make series public.
- $self->{'public'} = 0 unless UserInGroup('admin');
+ $self->{'public'} = 0 unless Bugzilla->user->in_group('admin');
}
sub writeToDatabase {
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 58008900f..5c5453231 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -790,9 +790,6 @@ sub create {
# started the session.
'sudoer' => sub { return Bugzilla->sudoer; },
- # UserInGroup. Deprecated - use the user.* functions instead
- 'UserInGroup' => \&Bugzilla::User::UserInGroup,
-
# SendBugMail - sends mail about a bug, using Bugzilla::BugMail.pm
'SendBugMail' => sub {
my ($id, $mailrecipients) = (@_);
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index c037f317a..81bbb7fc1 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -51,7 +51,6 @@ use Bugzilla::Field;
use base qw(Bugzilla::Object Exporter);
@Bugzilla::User::EXPORT = qw(is_available_username
login_to_id user_id_to_login validate_password
- UserInGroup
USER_MATCH_MULTIPLE USER_MATCH_FAILED USER_MATCH_SUCCESS
MATCH_SKIP_CONFIRM
);
@@ -1471,9 +1470,6 @@ sub validate_password {
return 1;
}
-sub UserInGroup {
- return exists Bugzilla->user->groups->{$_[0]} ? 1 : 0;
-}
1;
@@ -1893,10 +1889,6 @@ requirements for length and content), else returns false.
If a second password is passed in, this function also verifies that
the two passwords match.
-=item C<UserInGroup($groupname)>
-
-Takes a name of a group, and returns 1 if a user is in the group, 0 otherwise.
-
=back
=head1 SEE ALSO