Re: [rt-users] Disable fulltext search on simple search

2008-09-17 Thread Paulo Filipe Andrade
Here is another vote for that patch!

On Sep 11, 2008, at 4:32 PM, Kenneth Marshall wrote:

 Currently, the wiki
 has a patch for Oracle and we will be submiting a similar patch for
 use with PostgreSQL 8.3 and later.

Paulo F. Andrade
[EMAIL PROTECTED]




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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] Performance Issues after 3.8.0 upgrade -- PostgreSQL delays

2008-07-21 Thread Paulo Filipe Andrade


On Jul 18, 2008, at 5:37 AM, Tom Lanyon wrote:


For what its worth, I believe this is a big performance hit on RT
3.6.x too, so I'd recommend fixing rather than downgrading. :)

I witnessed this query with a high execution rate on RT 3.6.1.


Hello,
We are running RT 3.6 with a database with over 190 thousand tickets  
on PgSQL.

We added the following indexes to the databse:

CREATE INDEX groupstest1 ON Groups (lower(Domain));
CREATE INDEX groupstest2 ON Groups (lower(Type));
CREATE INDEX groupstest3 ON Groups  
(lower(Domain),Instance,lower(Type),id, Name);

CREATE INDEX groumemberstest1 ON groupmembers (groupid);
CREATE INDEX groumemberstest2 ON groupmembers (memberid);
CREATE INDEX userstest1 ON Users (lower(name));

PS: You should change the INDEX name, I just copied this from the test  
server.


Paulo F. Andrade
[EMAIL PROTECTED]



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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

[rt-users] Promoting a non-privileged user to a privileged user

2008-03-31 Thread Paulo Filipe Andrade
Hello,

I'm using RT with the LDAP patch. Everything is working as expected:  
logins, auto updating user information, etc.

However imagine the following situation:
1 - A user sends an e-mail to RT and is auto created as a non- 
privileged user.
2 - Later on that user is added to the LDAP (in my case to an LDAP  
group), to be part of the staff.
3 - User tries to login and gets thrown to the self-service page...

I want to modify the LDAP patch to allow for escalating a user to  
privileged if certain conditions apply.
However I don't know the correct way to do this escalation..  I don't  
quite understand how RT uses ACLs and Principals to get this working.

Thank you for your time!
Any help is appreciated,

Paulo F. Andrade
[EMAIL PROTECTED]



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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] RT creates a new session every 'Take', 'Update Ticket', 'Save'

2008-02-11 Thread Paulo Filipe Andrade
Hi,

I'm testing out rt3.6.6 and found that every time I create a ticket,  
update a ticket, or take a ticket (possibly even with more actions) I  
get sent back to the login page.

In the logs  everything seems fine..

I have set firefox to ask me before storing cookies, and found that  
whenever I click one of the mentioned actions I get a new session  
cookie. Of course, in the new session I'm not yet authenticated,  
therefore I get sent back to the login page.

I'm using postgres, but have also tried setting $WebSessionClass to  
'Apache::Session::File', but the problem persists.

I have searched and found many others with this type of problem  
(example: 
http://www.gossamer-threads.com/lists/rt/users/58833?search_string=back%20to%20login;#58833)
 
, but have not found a solution!

Any guidance toward debugging this is welcome!

Paulo F. Andrade
[EMAIL PROTECTED]



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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] LDAP overlay possible bug

2008-01-31 Thread Paulo Filipe Andrade
Hello, I'm using de ldap overlay from http://wiki.bestpractical.com/view/LDAP 
.


And I think I have found a bug when using Ldap Groups.

In LdapUserLocalOverlay the code that validates group membership is  
executed after user authentication, as a side effect the $ldap  
variable is binded to the ldap server using the user's login  
credentials instead of the credentials specified in the config file,  
namely $LdapUser and $LdapPass.


The following is a excerpt from my User_Local.pm that solves this  
(around line 200).

---
# Is there an LDAP Group to check?
if ($ldap_group) {
# Close current connection and rebind
$ldap-unbind;
$ldap = $self-_GetBoundLdapObj('Auth', version=3);
return unless $ldap;

$filter = Net::LDAP::Filter-new((${ldap_group_attr}=$ 
{ldap_dn}));

---

Note that the current code will work if the user login in has access  
to the ldap groups information, which is not my case.


Thank you for your time,

Paulo F. Andrade
[EMAIL PROTECTED]





smime.p7s
Description: S/MIME cryptographic signature
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] Accessing User_Local.pm user defined methods from Mason

2008-01-29 Thread Paulo Filipe Andrade
Thanks for the patch!
You might consider using the display name when sending an email too!

lib/RT/Action/SendEmail.pm line 640
- my $friendly_name = $self-TransactionObj-CreatorObj-RealName
+ my $friendly_name = $self-TransactionObj-CreatorObj-DisplayName


On Jan 25, 2008, at 8:21 PM, Dirk Pape wrote:

 Hello,

 --Am 25. Januar 2008 18:22:46 + schrieb Paulo Filipe Andrade
 [EMAIL PROTECTED]:

 I have tried adding DisplayName = { 'read' = 1 }, and it works..
 kind of. The first user's name in the drop down never gets displayed.
 Somehow the first call to the method never goes through..
 Any suggestions are welcome!

 I am quite sure that the first user in the dropdown is Nobody  
 which has
 neither Nickname nor Realname. You need a fallback (e.g. to User- 
 Name if
 both are empty).

 We have already a patch for the same thing (and more): We did not  
 like that
 in some cases the Emailaddress was displayed when showing a user in  
 other
 cases the Username (with or without Real Name).

 So we patched most occurrences where users are displayed with a call  
 to
 DisplayName or (in some cases) FriendlyEmailAddress, methods which we
 implemented in User_Overlay.pm.

 I attach a link to our patch here for reference. You may find that  
 it is
 worth to modify other places of User display as well. (The patch is  
 not yet
 ready because I am not sure whether we missed some places, where a  
 User
 will be displayed - so we did not yet modify Admin pages).

 http://page.mi.fu-berlin.de/pape/rt3/patches/rt/unified_user_display.patch 
 

 Regards,
 Dirk.

 -- 
 Dr. Dirk Pape (eAS - Projektleitung Campus Management)
 Freie Universitaet Berlin
 Grunewaldstr. 34a, 12165 Berlin
 Tel. +49 (30) 838 75143, Fax. +49 (30) 838 54654

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

 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]


 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: [EMAIL PROTECTED]


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


[rt-users] Accessing User_Local.pm user defined methods from Mason

2008-01-25 Thread Paulo Filipe Andrade
Hi,
I'm trying to get the Owner drop downs in RT to display a name built  
by the following method:

## This is in User_Local.pm

no warnings qw(redefine);

sub DisplayName {
 my $self = shift;
 my $displayName = $self-Name;

 if($self-RealName =~ /\b(\w+)\b.*\b(\w+)\b/){
 $displayName = $1 $2;
 }

 $displayName = (($self-NickName) ? $self-NickName :  
$displayName);

 return ($displayName);
}

1;

###

Then I changed Elements/SelectOwner (line 57) from

 %$User-Name%/option

to

 %$User-DisplayName%/option

Now, however I get an error from Mason stating:

RT::CurrentUser::DisplayName Unimplemented in HTML::Mason::Commands. (/ 
usr/local/share/request-tracker3.6/html/Elements/SelectOwner line 57)

I have searched a bit through the code and found that CurrentUser  
defines this:

sub _CoreAccessible  {
 {
 Name   = { 'read' = 1 },
 Gecos= { 'read' = 1 },
 RealName = { 'read' = 1 },
 Lang = { 'read' = 1 },
 Password = { 'read' = 0, 'write' = 0 },
 EmailAddress = { 'read' = 1, 'write' = 0 },
  };

}

I don't really know what this is, but I'm guessing it's for database  
getters and setters, which is not really what I want. I just want to  
be able to access my method.
What would be the correct way to be able to access my method from mason?

I have tried adding DisplayName = { 'read' = 1 }, and it works..  
kind of. The first user's name in the drop down never gets displayed.
Somehow the first call to the method never goes through..
Any suggestions are welcome!

Thank you for your time

Paulo F. Andrade
[EMAIL PROTECTED]



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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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