Documenting RT Queue configs?

Our RT instance has suddenly gained some interest within the company,
and I’m trying to keep on top of which queues exist, who can see them,
who can alter tickets in them and so on…

To that end, I started writing a perl script to produce an HTML report
of how Queues are configured - who is a watcher, what the correspondence
address is, and most importantly the permissions.

I’d like to be able to present that information with the context of the
groups people are members of, so it’s obvious that a whole block of
people are affected by the same group membership (I try to avoid giving
single users special permissions):

ModifyTicket:
User1
User2
Group1:
Group2:
User3
User4
User5

Before I dig into GroupMembers and figure it out, does such a thing
already exist? It seems like it’d be quite useful… RightsMatrix does
it from the point of view of a User, but not a Queue.

Thanks in advance for any pointers,

Howie

I’d like to be able to present that information with the context of the
groups people are members of, so it’s obvious that a whole block of
people are affected by the same group membership (I try to avoid giving
single users special permissions):

ModifyTicket:
User1
User2
Group1:
Group2:
User3
User4
User5

Before I dig into GroupMembers and figure it out, does such a thing
already exist? It seems like it’d be quite useful… RightsMatrix does
it from the point of view of a User, but not a Queue.

Just to stop this being one of those never-answered search hits, here’s
the function I came up with to do the recursive group part of this.
Given an RT::Group, it produces a nested

    list of all the groups,
    and their members. Each group and user has a link to their page in the
    Admin webui, so you can use it to tweak things.

    The actual rights checking I stole straight out of
    Admin/Queues/GroupRights.html and Admin/Elements/SelectRights.

    print “

      ”;
      print explode_group($Queue->AdminCc());
      print “
    ”;

    sub explode_group {
    my ($Group) = @_;

    my $results = "";

my $members = $Group->MembersObj();
while ( my $member = $members->Next ) {
    $results .= "<li><strong>" . $member->MemberObj->Object->Name .

“”;
if ( $member->MemberObj->IsGroup ) {
$results .= " [C]";
$results .= “

    ”;
    $results .= explode_group( $member->MemberObj->Object );
    $results .= “
”;
}
else {
$results .= " [C]";
$results .= " "
. ( $member->MemberObj->Object->RealName || “” ) . “
”;
$results .= " - “;
$results .= $member->MemberObj->Object->EmailAddress;
if ( $member->MemberObj->Object->Disabled ) {
$results .= " DISABLED”;
}
}
    $results .=  "</li>";
}

    return $results;

}

Howard,

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”?

Kenn
LBNLOn Thu, May 12, 2011 at 4:02 AM, Howard Jones howie@thingy.com wrote:

On 09/05/2011 10:30, Howard Jones wrote:

I’d like to be able to present that information with the context of the
groups people are members of, so it’s obvious that a whole block of
people are affected by the same group membership (I try to avoid giving
single users special permissions):

ModifyTicket:
User1
User2
Group1:
Group2:
User3
User4
User5

Before I dig into GroupMembers and figure it out, does such a thing
already exist? It seems like it’d be quite useful… RightsMatrix does
it from the point of view of a User, but not a Queue.

Just to stop this being one of those never-answered search hits, here’s
the function I came up with to do the recursive group part of this.
Given an RT::Group, it produces a nested

    list of all the groups,
    and their members. Each group and user has a link to their page in the
    Admin webui, so you can use it to tweak things.

    The actual rights checking I stole straight out of
    Admin/Queues/GroupRights.html and Admin/Elements/SelectRights.

    print “

      ”;
      print explode_group($Queue->AdminCc());
      print “
    ”;

    sub explode_group {
    my ($Group) = @_;

   my $results = "";

my $members = $Group->MembersObj();
while ( my $member = $members->Next ) {
$results .= “

  • ” . $member->MemberObj->Object->Name .
    "
    ";
    if ( $member->MemberObj->IsGroup ) {
    $results .= " [C]";
    $results .= “
      ”;
      $results .= explode_group( $member->MemberObj->Object );
      $results .= “
    ”;
    }
    else {
    $results .= " [C]";
    $results .= " "
    . ( $member->MemberObj->Object->RealName || “” ) . “
    ”;
    $results .= " - “;
    $results .= $member->MemberObj->Object->EmailAddress;
    if ( $member->MemberObj->Object->Disabled ) {
    $results .= " DISABLED”;
    }
    }
       $results .=  "</li>";
    

    }

       return $results;
    

    }