[rt-users] Set user rights with scrip?

Bill Chever wchever at terracottatech.com
Mon Jun 19 13:01:31 EDT 2006


RT is so cool.

>From the wiki;
"A ScripAction can access and change the current instance of the following
objects: 

Scrip 
Ticket 
Transaction 
Template "

I need to be able to affect a user's access rights with a scrip.

Scenario:
I want to allow anyone to send requests into Support
Like most you, I get lots of messages offering me PE patches, Viagra, and
partnerships with African ex-dignitaries
I need an easy way to manage and reduce spam without missing that possible
"We love your product and have $1M to spend."

Solution:
Have SpamAssasin insert **Possible SPAM** into the Subject line of suspected
spam (working)
Have RT check the Subject line and if 'Possible SPAM' is present, move the
ticket to the 'Trash' queue while also bypassing the AutoReply and Notify
scrips (working)

At some pre-defined schedule, have a human look at the Trash queue, use
Update multiple tickets, check all and set Status to 'deleted.'

One very cool thing I've discovered is that if a user exists in RT, and you
uncheck "Let this user access RT", the next time that same user attempts to
send a message, RT will reject it, not create the ticket, and send the user
a terse note explaining that they do not have create ticket rights.  That
would enable me to prevent any more spam from that same user, and save my
ticket numbers in the process.

So I want to create a script that does - 

Condition: Status eq 'deleted' and Queue eq 'Trash' 
Action: $RequestorObj->SetRights("Access",0)

Or similar.  Is it possible?  Right now I can accomplish this manually, but
mass updates are so much better.

Thanks in advance!

Bill








More information about the rt-users mailing list