[rt-users] Documenting RT Queue configs?

Kenneth Crocker kfcrocker at lbl.gov
Thu May 12 13:13:03 EDT 2011


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
LBNL

On Thu, May 12, 2011 at 4:02 AM, Howard Jones <howie at 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 <ul> 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 "<ul>";
>  print explode_group($Queue->AdminCc());
>  print "</ul>";
>
>
>
> sub explode_group {
>    my ($Group) = @_;
>
>        my $results = "";
>
>    my $members = $Group->MembersObj();
>    while ( my $member = $members->Next ) {
>        $results .= "<li><strong>" . $member->MemberObj->Object->Name .
> "</strong>";
>        if ( $member->MemberObj->IsGroup ) {
>            $results .= " <a href='"
>              . $RT::WebURL
>              . "/Admin/Groups/Modify.html?id="
>              . $member->MemberObj->Object->id
>              . "'>[C]</a>";
>            $results .= "<ul>";
>            $results .= explode_group( $member->MemberObj->Object );
>            $results .= "</ul>";
>        }
>        else {
>            $results .=  " <a href='"
>              . $RT::WebURL
>              . "/Admin/Users/Modify.html?id="
>              . $member->MemberObj->Object->id
>              . "'>[C]</a>";
>            $results .= " <em>"
>              . ( $member->MemberObj->Object->RealName || "" ) . "</em>";
>            $results .= " - ";
>            $results .= $member->MemberObj->Object->EmailAddress;
>            if ( $member->MemberObj->Object->Disabled ) {
>                $results .= " <strong class='warning'>DISABLED</strong>";
>            }
>        }
>
>        $results .=  "</li>";
>    }
>
>        return $results;
>
> }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110512/b98d492e/attachment.htm>


More information about the rt-users mailing list