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
ce0b20a5
Commit
ce0b20a5
authored
Oct 06, 2006
by
wurblzap%gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 352410: Shared Queries don't work if usevisibilitygroups is off.
Patch by Marc Schumann <wurblzap@gmail.com>, r=LpSolit, a=myk
parent
d5d46fd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
User.pm
Bugzilla/User.pm
+25
-3
No files found.
Bugzilla/User.pm
View file @
ce0b20a5
...
...
@@ -678,11 +678,19 @@ sub visible_groups_direct {
return
[]
unless
$self
->
id
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$sth
;
if
(
Bugzilla
->
params
->
{
'usevisibilitygroups'
})
{
my
$glist
=
join
(
','
,(
-
1
,
values
(
%
{
$self
->
groups
})));
my
$sth
=
$dbh
->
prepare
(
"SELECT DISTINCT grantor_id
$sth
=
$dbh
->
prepare
(
"SELECT DISTINCT grantor_id
FROM group_group_map
WHERE member_id IN($glist)
AND grant_type="
.
GROUP_VISIBLE
);
}
else
{
# All groups are visible if usevisibilitygroups is off.
$sth
=
$dbh
->
prepare
(
'SELECT id FROM groups'
);
}
$sth
->
execute
();
while
(
my
(
$row
)
=
$sth
->
fetchrow_array
)
{
...
...
@@ -703,12 +711,26 @@ sub visible_groups_as_string {
# from bless_groups instead of mirroring visible_groups_inherited, perhaps.
sub
queryshare_groups
{
my
$self
=
shift
;
my
@queryshare_groups
;
return
$self
->
{
queryshare_groups
}
if
defined
$self
->
{
queryshare_groups
};
if
(
$self
->
in_group
(
Bugzilla
->
params
->
{
'querysharegroup'
}))
{
return
$self
->
visible_groups_inherited
();
# We want to be allowed to share with groups we're in only.
# If usevisibilitygroups is on, then we need to restrict this to groups
# we may see.
if
(
Bugzilla
->
params
->
{
'usevisibilitygroups'
})
{
foreach
(
@
{
$self
->
visible_groups_inherited
()})
{
next
unless
$self
->
in_group_id
(
$_
);
push
(
@queryshare_groups
,
$_
);
}
}
else
{
return
[]
;
@queryshare_groups
=
values
(
%
{
$self
->
groups
});
}
}
return
$self
->
{
queryshare_groups
}
=
\
@queryshare_groups
;
}
sub
queryshare_groups_as_string
{
...
...
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