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
c457b4c4
Commit
c457b4c4
authored
Dec 10, 2002
by
bugreport%peshkin.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 184081 Change search interfaces to use Viewable products instead of enterable products
r=bbaetz a=justdave
parent
e9093fd7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
17 deletions
+28
-17
defparams.pl
defparams.pl
+5
-2
globals.pl
globals.pl
+17
-7
query.cgi
query.cgi
+1
-1
reports.cgi
reports.cgi
+1
-3
request.cgi
request.cgi
+4
-4
No files found.
defparams.pl
View file @
c457b4c4
...
...
@@ -261,8 +261,11 @@ sub check_netmask {
{
name
=>
'useentrygroupdefault'
,
desc
=>
'If this is on, Bugzilla will use product bug groups to restrict '
.
'who can enter bugs. Requires makeproductgroups to be on as well.'
,
desc
=>
'If this is on, Bugzilla will use product bug groups by default '
.
'to restrict who can enter bugs. If this is on, users can see '
.
'any product to which they have entry access in search menus. '
.
'If this is off, users can see any product to which they have not '
.
'been excluded by a mandatory restriction.'
,
type
=>
'b'
,
default
=>
0
},
...
...
globals.pl
View file @
c457b4c4
...
...
@@ -774,12 +774,17 @@ sub CanEnterProduct {
#
# This function returns an alphabetical list of product names to which
# the user can enter bugs.
sub
Get
Enter
ableProducts
{
sub
Get
Select
ableProducts
{
my
$query
=
"SELECT name "
.
"FROM products "
.
"LEFT JOIN group_control_map "
.
"ON group_control_map.product_id = products.id "
.
"AND group_control_map.entry != 0 "
;
"ON group_control_map.product_id = products.id "
;
if
(
Param
(
'useentrygroupdefault'
))
{
$query
.=
"AND group_control_map.entry != 0 "
;
}
else
{
$query
.=
"AND group_control_map.membercontrol = "
.
CONTROLMAPMANDATORY
.
" "
;
}
if
((
defined
@
{
$::vars
->
{
user
}{
groupids
}})
&&
(
@
{
$::vars
->
{
user
}{
groupids
}}
>
0
))
{
$query
.=
"AND group_id NOT IN("
.
...
...
@@ -796,19 +801,24 @@ sub GetEnterableProducts {
return
(
@products
);
}
# Get
Enter
ableProductHash
# Get
Select
ableProductHash
# returns a hash containing
# legal_products => an enterable product list
# legal_components => the list of components of enterable products
# components => a hash of component lists for each enterable product
sub
Get
Enter
ableProductHash
{
sub
Get
Select
ableProductHash
{
my
$query
=
"SELECT products.name, components.name "
.
"FROM products "
.
"LEFT JOIN components "
.
"ON components.product_id = products.id "
.
"LEFT JOIN group_control_map "
.
"ON group_control_map.product_id = products.id "
.
"AND group_control_map.entry != 0 "
;
"ON group_control_map.product_id = products.id "
;
if
(
Param
(
'useentrygroupdefault'
))
{
$query
.=
"AND group_control_map.entry != 0 "
;
}
else
{
$query
.=
"AND group_control_map.membercontrol = "
.
CONTROLMAPMANDATORY
.
" "
;
}
if
((
defined
@
{
$::vars
->
{
user
}{
groupids
}})
&&
(
@
{
$::vars
->
{
user
}{
groupids
}}
>
0
))
{
$query
.=
"AND group_id NOT IN("
.
...
...
query.cgi
View file @
c457b4c4
...
...
@@ -198,7 +198,7 @@ my @products = ();
my
%
component_set
;
my
%
version_set
;
my
%
milestone_set
;
foreach
my
$p
(
Get
Enter
ableProducts
())
{
foreach
my
$p
(
Get
Select
ableProducts
())
{
# We build up boolean hashes in the "-set" hashes for each of these things
# before making a list because there may be duplicates names across products.
push
@products
,
$p
;
...
...
reports.cgi
View file @
c457b4c4
...
...
@@ -61,9 +61,7 @@ GetVersionTable();
# We only want those products that the user has permissions for.
my
@myproducts
;
push
(
@myproducts
,
"-All-"
);
foreach
my
$this_product
(
@legal_product
)
{
push
(
@myproducts
,
$this_product
)
if
CanEnterProduct
(
$this_product
);
}
push
(
@myproducts
,
GetSelectableProducts
());
if
(
!
defined
$FORM
{
'product'
})
{
...
...
request.cgi
View file @
c457b4c4
...
...
@@ -254,10 +254,10 @@ sub queue {
# menu when the products menu changes; used by the template to populate
# the menus and keep the components menu consistent with the products menu
GetVersionTable
();
my
$
enterable
=
GetEnter
ableProductHash
();
$vars
->
{
'products'
}
=
$
enter
able
->
{
legal_products
};
$vars
->
{
'components'
}
=
$
enter
able
->
{
legal_components
};
$vars
->
{
'components_by_product'
}
=
$
enter
able
->
{
components
};
my
$
selectable
=
GetSelect
ableProductHash
();
$vars
->
{
'products'
}
=
$
select
able
->
{
legal_products
};
$vars
->
{
'components'
}
=
$
select
able
->
{
legal_components
};
$vars
->
{
'components_by_product'
}
=
$
select
able
->
{
components
};
$vars
->
{
'excluded_columns'
}
=
\
@excluded_columns
;
$vars
->
{
'group_field'
}
=
$::FORM
{
'group'
};
...
...
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