Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 294053 Details for
Bug 406471
3.37: OR based group checking for bugs and product entry
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
One way we can do this in can_see_bug()
or_groups.patch (text/plain), 4.55 KB, created by
David Lawrence
on 2008-02-05 22:42:07 UTC
(
hide
)
Description:
One way we can do this in can_see_bug()
Filename:
MIME Type:
Creator:
David Lawrence
Created:
2008-02-05 22:42:07 UTC
Size:
4.55 KB
patch
obsolete
>Index: Bugzilla/User.pm >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/Bugzilla/User.pm,v >retrieving revision 1.3 >diff -u -r1.3 User.pm >--- Bugzilla/User.pm 20 Jan 2008 16:38:25 -0000 1.3 >+++ Bugzilla/User.pm 5 Feb 2008 22:29:55 -0000 >@@ -586,33 +586,46 @@ > unless ($sth) { > $sth = $dbh->prepare("SELECT 1, reporter, assigned_to, qa_contact, > reporter_accessible, cclist_accessible, >- COUNT(cc.who), COUNT(bug_group_map.bug_id) >+ COUNT(cc.who), COUNT(bug_group_map.bug_id), >+ COUNT(user_group_map.group_id) > FROM bugs > LEFT JOIN cc > ON cc.bug_id = bugs.bug_id >- AND cc.who = $userid >+ AND cc.who = $userid > LEFT JOIN bug_group_map > ON bugs.bug_id = bug_group_map.bug_id >- AND bug_group_map.group_ID NOT IN(" . >- $self->groups_as_string . >- ") WHERE bugs.bug_id = ? >- AND creation_ts IS NOT NULL " . >- $dbh->sql_group_by('bugs.bug_id', 'reporter, ' . >- 'assigned_to, qa_contact, reporter_accessible, ' . >- 'cclist_accessible')); >+ LEFT JOIN user_group_map >+ ON user_group_map.group_id = bug_group_map.group_id >+ AND user_group_map.isbless = 0 >+ AND user_group_map.user_id = $userid >+ WHERE bugs.bug_id = ? >+ AND creation_ts IS NOT NULL " . >+ $dbh->sql_group_by('bugs.bug_id', 'reporter, ' . >+ 'assigned_to, qa_contact, reporter_accessible, ' . >+ 'cclist_accessible')); > } > $sth->execute($bugid); > my ($ready, $reporter, $owner, $qacontact, $reporter_access, $cclist_access, >- $isoncclist, $missinggroup) = $sth->fetchrow_array(); >+ $isoncclist, $found_groups, $found_members) = $sth->fetchrow_array(); > $sth->finish; > $self->{sthCanSeeBug} = $sth; >+ >+ my $group_membership = 0; >+ if ( Bugzilla->params->{'or_groups'} ) { >+ $group_membership = 1 if $found_members; >+ } >+ else { >+ $group_membership = 1 if $found_groups == $found_members; >+ } >+ > return ($ready > && ((($reporter == $userid) && $reporter_access) > || (Bugzilla->params->{'useqacontact'} > && $qacontact && ($qacontact == $userid)) > || ($owner == $userid) > || ($isoncclist && $cclist_access) >- || (!$missinggroup))); >+ || ($found_groups == 0) >+ || $group_membership)); > } > > sub can_see_product { >Index: Bugzilla/Config/GroupSecurity.pm >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/Bugzilla/Config/GroupSecurity.pm,v >retrieving revision 1.1.1.1 >diff -u -r1.1.1.1 GroupSecurity.pm >--- Bugzilla/Config/GroupSecurity.pm 19 Nov 2007 22:11:21 -0000 1.1.1.1 >+++ Bugzilla/Config/GroupSecurity.pm 5 Feb 2008 22:29:55 -0000 >@@ -96,7 +96,16 @@ > name => 'strict_isolation', > type => 'b', > default => 0 >- } ); >+ }, >+# REDHAT EXTENSION START 406471 >+# This param can be set to 1 to enable OR-based groups checking >+ { >+ name => 'or_groups', >+ type => 'b', >+ default => 0 >+ } >+# REDHAT EXTENSION END 406471 >+ ); > return @param_list; > } > >Index: template/en/default/admin/params/groupsecurity.html.tmpl >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/template/en/default/admin/params/groupsecurity.html.tmpl,v >retrieving revision 1.1.1.1 >diff -u -r1.1.1.1 groupsecurity.html.tmpl >--- template/en/default/admin/params/groupsecurity.html.tmpl 19 Nov 2007 22:11:21 -0000 1.1.1.1 >+++ template/en/default/admin/params/groupsecurity.html.tmpl 5 Feb 2008 22:29:55 -0000 >@@ -57,6 +57,8 @@ > "or make or remove dependencies " _ > "involving any bug that is in a product on which that " _ > "user is forbidden to edit.", >- >+# REDHAT ENTENSION START #406471 >+ or_groups => "Allow OR-based groups checking. ", >+# REDHAT ENTENSION END #406471 > } > %]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 406471
:
293982
|
293983
|
293984
|
294053
|
294073
|
294075
|
294076
|
294190
|
294306
|
294480
|
294619
|
294629
|
294714
|
294715
|
294863
|
294968
|
298956