Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

How to find which queues a user can post to, using the cli or the db

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


andreas.davour at snowmen

Jul 27, 2012, 2:50 AM

Post #1 of 3 (299 views)
Permalink
How to find which queues a user can post to, using the cli or the db

Hi

I have searched the wiki and the mailing list archive and not found any hints.

What I'd like to do is create a list of active users, then go over that list or users, showing each and every queue that specific user have rights to post on.

I know how to do it in the GUI, but then I get a lot more information which I don't need, and I'd like to get the data in a way that I could pipe it for further processing on the command line.

Pointers to the documentation appreciated. I have looked around in the db and can't figure out how to tie the data about queue id and user id together.

thanks.

/andreas


falcone at bestpractical

Jul 31, 2012, 10:34 AM

Post #2 of 3 (240 views)
Permalink
Re: How to find which queues a user can post to, using the cli or the db [In reply to]

On Fri, Jul 27, 2012 at 11:50:02AM +0200, Andreas Davour wrote:
> I have searched the wiki and the mailing list archive and not found any hints.
>
> What I'd like to do is create a list of active users, then go over that list or users, showing each and every queue that specific user have rights to post on.
>
> I know how to do it in the GUI, but then I get a lot more information which I don't need, and I'd like to get the data in a way that I could pipe it for further processing on the command line.
>
> Pointers to the documentation appreciated. I have looked around in the db and can't figure out how to tie the data about queue id and user id together.

The easiest code (although it's a bit complex because of the caching)
is all the checking in Elements/SelectQueue - it loads up an RT::Queue
with the appropriate CurrentUser and then calls CurrentUserHasRight -
there are some other methods like Users' WhoHaveRight that might be
interesting. Doing this by hand in the DB is likely to be really
complex unless you understand all the relationships. The generated
SQL is often quite hairy.

-kevin


andreas.davour at snowmen

Aug 1, 2012, 12:15 AM

Post #3 of 3 (232 views)
Permalink
Re: How to find which queues a user can post to, using the cli or the db [In reply to]

At Tue, 31 Jul 2012 13:34:14 -0400,
Kevin Falcone wrote:
>
> [1 <text/plain; us-ascii (quoted-printable)>]
> On Fri, Jul 27, 2012 at 11:50:02AM +0200, Andreas Davour wrote:
> > I have searched the wiki and the mailing list archive and not found any hints.
> >
> > What I'd like to do is create a list of active users, then go over that list or users, showing each and every queue that specific user have rights to post on.
> >
> > I know how to do it in the GUI, but then I get a lot more information which I don't need, and I'd like to get the data in a way that I could pipe it for further processing on the command line.
> >
> > Pointers to the documentation appreciated. I have looked around in the db and can't figure out how to tie the data about queue id and user id together.
>
> The easiest code (although it's a bit complex because of the caching)
> is all the checking in Elements/SelectQueue - it loads up an RT::Queue
> with the appropriate CurrentUser and then calls CurrentUserHasRight -
> there are some other methods like Users' WhoHaveRight that might be
> interesting. Doing this by hand in the DB is likely to be really
> complex unless you understand all the relationships. The generated
> SQL is often quite hairy.

Sounds like I will give up on that part of RT. Many thanks for your feedback Kevin!

/andreas

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.