[rt-users] Getting a list of privileged users...

2009-11-19 Thread Johnathan Bell
I'm running a script that grabs a list of users from our LDAP directory and 
synchronizes group memberships and permissions. Currently, I use code similar 
to this, to get a list of members:

--snip--
my $currentUser = GetCurrentUser();
my $workingUser = new RT::User($currentUser);
my $systemUser  = RT::User-new($RT::SystemUser);

# RT Group
$groupObj = new RT::Group($currentUser);
$groupObj-LoadUserDefinedGroup($groupName);

if ( not $groupObj-Id() )
{
print Group .$groupName. not found in RequestTracker\n;
next;
}

# Get our members into an array for easy work later.
$groupMembersObj = $groupObj-MembersObj();
my @rtMembers;
while ( $groupMember = $groupMembersObj-Next() )
{
$groupMemberUser = $groupMember-UserObj();
$workingUser-Load($groupMember-MemberId());
$workingUser-Name();
push(@rtMembers, $workingUser-Name());
}
--snip--

Basically, I load a group by name, and then loop through the array and grab 
each user into an array. Is there a way I can do this for privileged user 
names? I just want to get them into an array to work with them later.

Thanks,
Johnathan

--
Johnathan Bell
Internet System Administrator, Baker College

Office Phone: 810-766-4097
Office Hours: 7A-4P, M-F

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Getting a list of privileged users...

2009-11-19 Thread Emmanuel Lacour
On Thu, Nov 19, 2009 at 08:33:06AM -0500, Johnathan Bell wrote:
 I'm running a script that grabs a list of users from our LDAP directory and 
 synchronizes group memberships and permissions. Currently, I use code similar 
 to this, to get a list of members:
 
 --snip--
 my $currentUser = GetCurrentUser();

 my $workingUser = new RT::User($currentUser);
 my $systemUser  = RT::User-new($RT::SystemUser);

those two lines are useless, $currentUser and $RT::SystemUser are
already objects, $workingUser and $systemUser are just empty users
objects

 
 Basically, I load a group by name, and then loop through the array and
 grab each user into an array. Is there a way I can do this for
 privileged user names? I just want to get them into an array to work
 with them later.
 

there is different way to do this, it depends on the final purpose, but
the simplest way to get all priviledged users is:

my $PrivilegedUsers = RT::Users-new ( $RT::SystemUser );
$PrivilegedUsers-LimitToPrivileged;

the walk this with:

while ( my $PrivilegedUser = $PrivilegedUsers-Next ) {
...things to do with user object $PrivilegedUser
}

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] How to add attachments (not links) with a template to an outgoing mail?

2009-11-19 Thread Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Hi,
i followed the the instructions from wiki to add all attachments from a ticket 
(during the whole livetime) as links to the outgoing mail. No i need to attache 
all the attachements to the outgoing mail, but i can't find anything useful at 
the wiki for this.

Any suggestions?

Torsten

Kuehne + Nagel (AG  Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), 
Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, 
Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer 
Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 
812773878, Persoenlich haftende Gesellschaft: Kuehne  Nagel A.G., Sitz: 
Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] lighttpd + FastCGI + RT - Broken CSS / Menu Items Dont Work

2009-11-19 Thread Maxwell A. Rathbone
Again discovered the solution to my problem. I previously compiled RT 
with FastCGI and was trying to display it with mod_perl2.

Recompile of RT with the correct handler fixed the problem.

Thanks

Max

Maxwell Rathbone wrote:
 Hello,

 Once again it appears I've run into a snag. I'm running lighttpd with RT 
 on CentOS 5.4. This is my first attempt at trying to get RT to run under 
 lighttpd with FastCGI. When I open the RT URL in my browser, everything 
 is flush left and the only image shown anywhere on the page is the best 
 practical logo. There are no colors on the page at all aside from the 
 links themselves. My first thought was that there must be a missing CSS 
 file. So I first hunted through the access.log for lighttpd only to find 
 a status code 200 on everything. This implies the web server was able to 
 provide my browser all files.

 I next logged into the interface, and was presented with what appears to 
 be the dashboard, and logged in user menu. Again, no colors, no 
 formatting on the page. Appears as if some CSS file somewhere is 
 missing. I discovered that none of the menu items(Simple Search, 
 Tickets, Tools, Configuration, Preferences, etc) work. When I click 
 them, the URL changes, however I continue to only be shown the homepage 
 in my browser.

 I double checked all the examples I could find online and my 
 lighttpd.conf appears to be correct. I feel I'm at a loss here. If 
 anyone can provide some help on this one, I'd appreciate it.

 The best that I seem to be able to determine is that it's probably 
 something wrong in the lighttpd's mod_rewrite configuration as it seems 
 to be redirecting what should be static URL's to the homepage.

 Here is my lighttpd.conf file:
 server.modules  = (
mod_rewrite,
mod_redirect,
mod_alias,
 mod_access,
mod_cml,
mod_trigger_b4_dl,
mod_auth,
mod_status,
mod_setenv,
mod_fastcgi,
mod_proxy,
mod_simple_vhost,
mod_evhost,
mod_userdir,
mod_cgi,
mod_compress,
mod_ssi,
mod_usertrack,
mod_expire,
mod_secdownload,
 #   mod_rrdtool,
 mod_accesslog )

 server.document-root= /srv/www/lighttpd/
 server.errorlog = /var/log/lighttpd/error.log
 index-file.names= ( index.php, index.html,
 index.htm, default.htm )
 mimetype.assign = (
   .rpm  =  application/x-rpm,
   .pdf  =  application/pdf,
   .sig  =  application/pgp-signature,
   .spl  =  application/futuresplash,
   .class=  application/octet-stream,
   .ps   =  application/postscript,
   .torrent  =  application/x-bittorrent,
   .dvi  =  application/x-dvi,
   .gz   =  application/x-gzip,
   .pac  =  application/x-ns-proxy-autoconfig,
   .swf  =  application/x-shockwave-flash,
   .tar.gz   =  application/x-tgz,
   .tgz  =  application/x-tgz,
   .tar  =  application/x-tar,
   .zip  =  application/zip,
   .mp3  =  audio/mpeg,
   .m3u  =  audio/x-mpegurl,
   .wma  =  audio/x-ms-wma,
   .wax  =  audio/x-ms-wax,
   .ogg  =  application/ogg,
   .wav  =  audio/x-wav,
   .gif  =  image/gif,
   .jar  =  application/x-java-archive,
   .jpg  =  image/jpeg,
   .jpeg =  image/jpeg,
   .png  =  image/png,
   .xbm  =  image/x-xbitmap,
   .xpm  =  image/x-xpixmap,
   .xwd  =  image/x-xwindowdump,
   .css  =  text/css,
   .html =  text/html,
   .htm  =  text/html,
   .js   =  text/javascript,
   .asc  =  text/plain,
   .c=  text/plain,
   .cpp  =  text/plain,
   .log  =  text/plain,
   .conf =  text/plain,
   .text =  text/plain,
   .txt  =  text/plain,
   .dtd  =  text/xml,
   .xml  =  text/xml,
   .mpeg =  video/mpeg,
   .mpg  =  video/mpeg,
   .mov  =  video/quicktime,
   .qt   =  video/quicktime,
   .avi  =  video/x-msvideo,
   .asf  =  video/x-ms-asf,
   .asx  =  

Re: [rt-users] How to add attachments (not links) with a template to anoutgoing mail?

2009-11-19 Thread Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
One thing i forgot:

'RT-Attach-Message: Yes' is a special header that RT uses internally. It means 
that the outgoing mail should be created with all attachments. Instead of 
adding attachments to an outgoing email you can add links to those using 
AddAttachmentLinksToMail. 

This point from wiki i have tried already and it is not working. 

Torsten 

-Ursprüngliche Nachricht-
Von: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von Brumm,Torsten 
/ Kuehne + Nagel / Ham MI-ID
Gesendet: Donnerstag, 19. November 2009 15:58
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] How to add attachments (not links) with a template to 
anoutgoing mail?

Hi,
i followed the the instructions from wiki to add all attachments from a ticket 
(during the whole livetime) as links to the outgoing mail. No i need to attache 
all the attachements to the outgoing mail, but i can't find anything useful at 
the wiki for this.

Any suggestions?

Torsten

Kuehne + Nagel (AG  Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), 
Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, 
Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer 
Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 
812773878, Persoenlich haftende Gesellschaft: Kuehne  Nagel A.G., Sitz: 
Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com Commercial support: 
sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Permission Denied while using RT::Extension::CommandByMail

2009-11-19 Thread Matt Adams
Please ignore my previous email re: Permission Denied while using 
CommandByMail.  As it turns out it I was confusing this error with 
CommmandByMail when it was really just a simple RT permissions issue 
(users couldn't respond to tickets).


Thanks,

Matt
-- 
Matt Adams
Development  Network Services, Cypress Interactive
http://cypressinteractive.com, http://edsuite.com
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Adding AdminCCs on ticket creation

2009-11-19 Thread JC Boggio
Ken,

Ken Crocker a écrit :
 I created something similar to this only it was for Ticket CC's. 

I've found two interesting pages on the wiki, this one being the
solution :

http://wiki.bestpractical.com/view/AddWatcherPerTicket

This one is quite interesting too :

http://wiki.bestpractical.com/view/ScripExecOrder


Thanks for pointing me there.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] error on preferences page after upgrading from 3.8.5 to 3.8.6

2009-11-19 Thread slamp slamp
On Tue, Nov 17, 2009 at 3:29 AM, Emmanuel Lacour
elac...@easter-eggs.com wrote:
 On Tue, Nov 17, 2009 at 12:32:09AM -0500, slamp slamp wrote:
 Error on preferences page:

 Can't locate object method date_format_full via package
 DateTime::Locale::en at /opt/rt3/bin/../lib/RT/Date.pm line 659.

 Error in the error_log:

 FastCGI: server /opt/rt3/bin/mason_handler.fcgi stderr: Use of
 uninitialized value in hash element at
 /opt/rt386/share/html/Widgets/Form/Select line 120., referer:
 https://rt.warpdrive.net/Admin/


 this will be fixed in 3.8.7, as of now, you can just update
 DateTime::Locale to latest version or grab the commit diff on github:
 59000984a6f50c1290a81d116c38a0a87534eae0


updated the DateTime::Locale to the latest version and I now get this error:

Can't locate object method format_cldr via package DateTime at
/opt/rt3/bin/../lib/RT/Date.pm line 687.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] lighttpd + FastCGI + RT - Broken CSS / Menu Items Dont Work

2009-11-19 Thread Maxwell A. Rathbone
Okay I take this back.. not sure what I was thinking.. Guess I got 
confused between my attempts with lighttpd and just trying to prove it 
works through Apache.


This problem is still unresolved unfortunately. I did recompile RT with 
the right handler, and none of the menu items or links work. It seems as 
if the handler is not properly handling sub directories??


Weird thing is, I've been looking at RT in Chrome and Firefox.. when I 
turned off Apache and turned on lighttpd, the CSS retained in my 
browser. PResumably because it was cached. In IE, the lighttpd instance 
of my RT still continues to not have any CSS formatting or colorization. 
(In addition to the menu items and links not working)


Max

Maxwell A. Rathbone wrote:
Again discovered the solution to my problem. I previously compiled RT 
with FastCGI and was trying to display it with mod_perl2.


Recompile of RT with the correct handler fixed the problem.

Thanks

Max

Maxwell Rathbone wrote:
  

Hello,

Once again it appears I've run into a snag. I'm running lighttpd with RT 
on CentOS 5.4. This is my first attempt at trying to get RT to run under 
lighttpd with FastCGI. When I open the RT URL in my browser, everything 
is flush left and the only image shown anywhere on the page is the best 
practical logo. There are no colors on the page at all aside from the 
links themselves. My first thought was that there must be a missing CSS 
file. So I first hunted through the access.log for lighttpd only to find 
a status code 200 on everything. This implies the web server was able to 
provide my browser all files.


I next logged into the interface, and was presented with what appears to 
be the dashboard, and logged in user menu. Again, no colors, no 
formatting on the page. Appears as if some CSS file somewhere is 
missing. I discovered that none of the menu items(Simple Search, 
Tickets, Tools, Configuration, Preferences, etc) work. When I click 
them, the URL changes, however I continue to only be shown the homepage 
in my browser.


I double checked all the examples I could find online and my 
lighttpd.conf appears to be correct. I feel I'm at a loss here. If 
anyone can provide some help on this one, I'd appreciate it.


The best that I seem to be able to determine is that it's probably 
something wrong in the lighttpd's mod_rewrite configuration as it seems 
to be redirecting what should be static URL's to the homepage.


Here is my lighttpd.conf file:
server.modules  = (
   mod_rewrite,
   mod_redirect,
   mod_alias,
mod_access,
   mod_cml,
   mod_trigger_b4_dl,
   mod_auth,
   mod_status,
   mod_setenv,
   mod_fastcgi,
   mod_proxy,
   mod_simple_vhost,
   mod_evhost,
   mod_userdir,
   mod_cgi,
   mod_compress,
   mod_ssi,
   mod_usertrack,
   mod_expire,
   mod_secdownload,
#   mod_rrdtool,
mod_accesslog )

server.document-root= /srv/www/lighttpd/
server.errorlog = /var/log/lighttpd/error.log
index-file.names= ( index.php, index.html,
index.htm, default.htm )
mimetype.assign = (
  .rpm  =  application/x-rpm,
  .pdf  =  application/pdf,
  .sig  =  application/pgp-signature,
  .spl  =  application/futuresplash,
  .class=  application/octet-stream,
  .ps   =  application/postscript,
  .torrent  =  application/x-bittorrent,
  .dvi  =  application/x-dvi,
  .gz   =  application/x-gzip,
  .pac  =  application/x-ns-proxy-autoconfig,
  .swf  =  application/x-shockwave-flash,
  .tar.gz   =  application/x-tgz,
  .tgz  =  application/x-tgz,
  .tar  =  application/x-tar,
  .zip  =  application/zip,
  .mp3  =  audio/mpeg,
  .m3u  =  audio/x-mpegurl,
  .wma  =  audio/x-ms-wma,
  .wax  =  audio/x-ms-wax,
  .ogg  =  application/ogg,
  .wav  =  audio/x-wav,
  .gif  =  image/gif,
  .jar  =  application/x-java-archive,
  .jpg  =  image/jpeg,
  .jpeg =  image/jpeg,
  .png  =  image/png,
  .xbm  =  image/x-xbitmap,
  .xpm  =  image/x-xpixmap,
  .xwd  =  image/x-xwindowdump,
  .css  =  text/css,
  .html =  

Re: [rt-users] How to add attachments (not links) with a template to an outgoing mail?

2009-11-19 Thread Tom Lahti
Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
 Hi, i followed the the instructions from wiki to add all attachments
 from a ticket (during the whole livetime) as links to the outgoing
 mail. No i need to attache all the attachements to the outgoing mail,
 but i can't find anything useful at the wiki for this.
 
 Any suggestions?

As far as I know, you'd have to write a custom email template that 
fetches the attachment contents through the perl API and builds a 
MIME-encapsulated message body.  Of course it has to execute fully 
before the resulting page will display, which might take awhile.

Since I've forgotten most of my perl at this point, and I'd want the 
page to display quicker, personally I would probably build myself a 
custom REST service and have the perl template call that and supply some 
parameters.  But that's just me.

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com