Howard,<br><br>We have over 100 Queues that we use to support a whole slew of software. Although Rights Matrix does help when I'm curious about who can do what, your report idea is something I think might come in handy for us. If you ever get it working, are you going to create an extension for RT to implement with a future version upgrade? Perhaps under "Tools->Reports"?<br>
<br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Thu, May 12, 2011 at 4:02 AM, Howard Jones <span dir="ltr"><<a href="mailto:howie@thingy.com">howie@thingy.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 09/05/2011 10:30, Howard Jones wrote:<br>
> I'd like to be able to present that information with the context of the<br>
> groups people are members of, so it's obvious that a whole block of<br>
> people are affected by the same group membership (I try to avoid giving<br>
> single users special permissions):<br>
><br>
> ModifyTicket:<br>
> User1<br>
> User2<br>
> Group1:<br>
> Group2:<br>
> User3<br>
> User4<br>
> User5<br>
><br>
> Before I dig into GroupMembers and figure it out, does such a thing<br>
> already exist? It seems like it'd be quite useful... RightsMatrix does<br>
> it from the point of view of a User, but not a Queue.<br>
><br>
</div>Just to stop this being one of those never-answered search hits, here's<br>
the function I came up with to do the recursive group part of this.<br>
Given an RT::Group, it produces a nested <ul> list of all the groups,<br>
and their members. Each group and user has a link to their page in the<br>
Admin webui, so you can use it to tweak things.<br>
<br>
The actual rights checking I stole straight out of<br>
Admin/Queues/GroupRights.html and Admin/Elements/SelectRights.<br>
<br>
print "<ul>";<br>
print explode_group($Queue->AdminCc());<br>
print "</ul>";<br>
<br>
<br>
<br>
sub explode_group {<br>
my ($Group) = @_;<br>
<br>
my $results = "";<br>
<br>
my $members = $Group->MembersObj();<br>
while ( my $member = $members->Next ) {<br>
$results .= "<li><strong>" . $member->MemberObj->Object->Name .<br>
"</strong>";<br>
if ( $member->MemberObj->IsGroup ) {<br>
$results .= " <a href='"<br>
. $RT::WebURL<br>
. "/Admin/Groups/Modify.html?id="<br>
. $member->MemberObj->Object->id<br>
. "'>[C]</a>";<br>
$results .= "<ul>";<br>
$results .= explode_group( $member->MemberObj->Object );<br>
$results .= "</ul>";<br>
}<br>
else {<br>
$results .= " <a href='"<br>
. $RT::WebURL<br>
. "/Admin/Users/Modify.html?id="<br>
. $member->MemberObj->Object->id<br>
. "'>[C]</a>";<br>
$results .= " <em>"<br>
. ( $member->MemberObj->Object->RealName || "" ) . "</em>";<br>
$results .= " - ";<br>
$results .= $member->MemberObj->Object->EmailAddress;<br>
if ( $member->MemberObj->Object->Disabled ) {<br>
$results .= " <strong class='warning'>DISABLED</strong>";<br>
}<br>
}<br>
<br>
$results .= "</li>";<br>
}<br>
<br>
return $results;<br>
<br>
}<br>
<br>
</blockquote></div><br>