Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
beb7bbd5
Commit
beb7bbd5
authored
Oct 17, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 350933: Ability to limit config.cgi output by product
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=myk
parent
1b2d1898
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
config.cgi
config.cgi
+16
-2
No files found.
config.cgi
View file @
beb7bbd5
...
...
@@ -38,6 +38,7 @@ use Bugzilla::Bug;
use
Bugzilla::
Field
;
my
$user
=
Bugzilla
->
login
(
LOGIN_OPTIONAL
);
my
$cgi
=
Bugzilla
->
cgi
;
# If the 'requirelogin' parameter is on and the user is not
# authenticated, return empty fields.
...
...
@@ -56,7 +57,20 @@ $vars->{'resolution'} = get_legal_field_values('resolution');
$vars
->
{
'status'
}
=
get_legal_field_values
(
'bug_status'
);
# Include a list of product objects.
$vars
->
{
'products'
}
=
$user
->
get_selectable_products
;
if
(
$cgi
->
param
(
'product'
))
{
my
@products
=
$cgi
->
param
(
'product'
);
foreach
my
$product_name
(
@products
)
{
# We don't use check_product because config.cgi outputs mostly
# in XML and JS and we don't want to display an HTML error
# instead of that.
my
$product
=
new
Bugzilla::
Product
({
name
=>
$product_name
});
if
(
$product
&&
$user
->
can_see_product
(
$product
->
name
))
{
push
(
@
{
$vars
->
{
'products'
}},
$product
);
}
}
}
else
{
$vars
->
{
'products'
}
=
$user
->
get_selectable_products
;
}
# Create separate lists of open versus resolved statuses. This should really
# be made part of the configuration.
...
...
@@ -78,7 +92,7 @@ display_data($vars);
sub
display_data
{
my
$vars
=
shift
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$template
=
Bugzilla
->
template
;
# Determine how the user would like to receive the output;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment