<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all<br>
<div class="moz-forward-container"> <br>
I've noticed that the WhoBelongToGroups method of user search
class RT::Users unconditionally calls LimitToPrivileged, making it
useless for when you want to find both privileged and unprivileged
users, or when you want to find only unprivileged users where
you've already called LimitToUnprivileged . This behaviour isn't
documented and there's a comment:<br>
<br>
# Unprivileged users can't be granted real system rights.<br>
# is this really the right thing to be saying?<br>
$self->LimitToPrivileged();<br>
<br>
that suggests uncertainty about whether it's correct.<br>
<br>
I'm running 4.07 but this code remains in 4.10 and in 4.2 git
master HEAD.<br>
<br>
The attached patch documents the current behaviour and adds a flag
to override it per-call. It applies to 4.0 and master HEAD. A pull
request has been sent with the changes:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a moz-do-not-send="true"
href="https://github.com/bestpractical/rt/pull/47">https://github.com/bestpractical/rt/pull/47</a><br>
<br>
Filed as RT ticket 22989.<br>
<br>
Anyone who wants to apply this change in the mean time can do so
by grabbing lib/RT/Users.pm, extracting the WhoBelongToGroups
method from it, and adding it to $localrtlib/RT/Users_Local.pm
like this:<br>
<br>
-----<br>
use strict;<br>
no warnings qw(redefine);<br>
package RT::Users;<br>
<br>
# paste WhoBelongToGroups method here<br>
<br>
1;<br>
----<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Craig Ringer <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.2ndQuadrant.com/">http://www.2ndQuadrant.com/</a>
PostgreSQL Development, 24x7 Support, Training & Services</pre>
<br>
</div>
<br>
</body>
</html>