checker => \&check_group
},
+ {
+ name => 'debug_group',
+ type => 's',
+ choices => \&_get_all_group_names,
+ default => 'admin',
+ checker => \&check_group
+ },
+
{
name => 'usevisibilitygroups',
type => 'b',
# Query Execution
################################################################################
-if ($cgi->param('debug')) {
+if ($cgi->param('debug')
+ && Bugzilla->params->{debug_group}
+ && Bugzilla->user->in_group(Bugzilla->params->{debug_group})
+) {
$vars->{'debug'} = 1;
$vars->{'query'} = $query;
# Explains are limited to admins because you could use them to figure
$vars->{'height'} = $height if $height;
$vars->{'query'} = $query;
-$vars->{'debug'} = $cgi->param('debug');
+
+if ($cgi->param('debug')
+ && Bugzilla->params->{debug_group}
+ && Bugzilla->user->in_group(Bugzilla->params->{debug_group})
+) {
+ $vars->{'debug'} = 1;
+}
my $formatparam = $cgi->param('format');
querysharegroup => "The name of the group of users who can share their " _
"saved searches with others.",
+ debug_group => "The name of the group of users who can view the actual " _
+ "SQL query generated when viewing $terms.bug lists and reports.",
+
usevisibilitygroups => "Do you wish to restrict visibility of users to members of " _
"specific groups?",