RTx::EmailCompletion with LDAP : testers needed

Hello,

I’ve added LDAP autocompletion in RTx::EmailCompletion. As I won’t use
this feature myself, I need some testers before releasing it next
week.

You can find it here : http://gaspard.mine.nu/RTx-EmailCompletion-0.03.tar.gz

Thanks

Seems to be working all right here so far – I did make a couple of
minor tweaks (diff is attached):

  • Added EmailCompletionLdapUser and EmailCompletionLdapPass
    configuration variables to support LDAP servers that don’t allow
    anonymous binding

  • Sorted the results of the LDAP search

One possible weakness I can see with my changes is that I don’t think
they’ll allow for a case where the ldap server used for email
autocompletion allows anonymous binds but the server used for
authentication doesn’t. I’m not sure what the most graceful way would
be to handle that scenario while still supporting fallthrough to an
underlying LDAP configuration.

Also…I’m not sure how hard this would be, but for sites that use both
LDAP and RDBM lookups for email completion, I can see it being useful
for the dropdown to indicate where each item originated.

Mark Roedel
Senior Programmer / Analyst
LeTourneau University
Longview, Texas USA-----Original Message-----
From: rt-devel-bounces@lists.bestpractical.com
[mailto:rt-devel-bounces@lists.bestpractical.com] On Behalf Of Nicolas
Chuche
Sent: Sunday, November 11, 2007 12:57 PM
To: rt-devel@lists.bestpractical.com
Subject: [Rt-devel] RTx::EmailCompletion with LDAP : testers needed

Hello,

I’ve added LDAP autocompletion in RTx::EmailCompletion. As I won’t use
this feature myself, I need some testers before releasing it next
week.

You can find it here :
http://gaspard.mine.nu/RTx-EmailCompletion-0.03.tar.gz

Thanks

rtx-emailcompletion-diff.txt (2.05 KB)

Hello,

New rc available http://gaspard.mine.nu/RTx-EmailCompletion-0.03rc2.tar.gz

  • Added EmailCompletionLdapUser and EmailCompletionLdapPass
    configuration variables to support LDAP servers that don’t allow
    anonymous binding

  • Sorted the results of the LDAP search

Ok got it. I’ve change it a bit and applied it.

One possible weakness I can see with my changes is that I don’t think
they’ll allow for a case where the ldap server used for email
autocompletion allows anonymous binds but the server used for
authentication doesn’t. I’m not sure what the most graceful way would
be to handle that scenario while still supporting fallthrough to an
underlying LDAP configuration.

The best idea I can think of (is it english ?) is to verify that
LdapServer and EmailCompletionLdapServer are the same and if not,
don’t fallback to LdapUser/LdapPass. I will do that way for the
moment. If you have a better idea, let me know.

I will keep the fallback for EmailCompletionBase and
EmailCompletionFilter because it seems good for those two.

Also…I’m not sure how hard this would be, but for sites that use both
LDAP and RDBM lookups for email completion, I can see it being useful
for the dropdown to indicate where each item originated.

Quite easy, LDAP emails now have light grey background. If you have a
better idea or a better color, let me know.

By the way, thanks for the patch and for your help.

One correction:

In lib/RTx/EmailCompletion/Ldap.pm, line 20 currently reads

    $ldap->bind($RT::EmailCompletionLdapUser,

$RT::EmailCompletionLdapPass)

And should be

    $ldap->bind($RT::EmailCompletionLdapUser,

password=>$RT::EmailCompletionLdapPass)

I’m also not seeing the grey backgrounds, but haven’t had time to look
at whether that’s a problem with the plugin, or somehow something in our
local setup. I’ll hopefully have time to work with it some more
tomorrow.

Mark Roedel
Senior Programmer / Analyst
LeTourneau UniversityFrom: nchuche@gmail.com [mailto:nchuche@gmail.com] On Behalf Of Nicolas
Chuche
Sent: Monday, November 12, 2007 3:39 PM
To: Roedel, Mark
Cc: rt-devel@lists.bestpractical.com
Subject: Re: [Rt-devel] RTx::EmailCompletion with LDAP : testers needed

Hello,

New rc available
http://gaspard.mine.nu/RTx-EmailCompletion-0.03rc2.tar.gz

  • Added EmailCompletionLdapUser and EmailCompletionLdapPass
    configuration variables to support LDAP servers that don’t allow
    anonymous binding

  • Sorted the results of the LDAP search

Ok got it. I’ve change it a bit and applied it.

One possible weakness I can see with my changes is that I don’t think
they’ll allow for a case where the ldap server used for email
autocompletion allows anonymous binds but the server used for
authentication doesn’t. I’m not sure what the most graceful way would
be to handle that scenario while still supporting fallthrough to an
underlying LDAP configuration.

The best idea I can think of (is it english ?) is to verify that
LdapServer and EmailCompletionLdapServer are the same and if not,
don’t fallback to LdapUser/LdapPass. I will do that way for the
moment. If you have a better idea, let me know.

I will keep the fallback for EmailCompletionBase and
EmailCompletionFilter because it seems good for those two.

Also…I’m not sure how hard this would be, but for sites that use
both
LDAP and RDBM lookups for email completion, I can see it being useful
for the dropdown to indicate where each item originated.

Quite easy, LDAP emails now have light grey background. If you have a
better idea or a better color, let me know.

By the way, thanks for the patch and for your help.

    $ldap->bind($RT::EmailCompletionLdapUser,

password=>$RT::EmailCompletionLdapPass)

Oups, should have read your patch more carefully !

rc3 available here : http://gaspard.mine.nu/rtx/

I’m also not seeing the grey backgrounds, but haven’t had time to look
at whether that’s a problem with the plugin, or somehow something in our
local setup. I’ll hopefully have time to work with it some more
tomorrow.

I must admit, I’m not really the css kind of guy, I’m more sysadmin.
It works for me but perhaps by mistake :).

Hi,On Mon, 2007-11-12 at 23:49 +0100, Nicolas Chuche wrote:

rc3 available here : http://gaspard.mine.nu/rtx/

Just a minor bug fix to the documentation, EmailCompletionLdapServer
must be set. The documentation says “If not set, RTx::EmailCompletion
will search for LdapServer parameter…”, this isn’t the case. If
EmailCompletionLdapServer isn’t set then LDAP isn’t used for
EmailCompletion.

Cheers!

Andrew Ruthven, Wellington, New Zealand
At home: andrew@etc.gen.nz | This space intentionally
| left blank.

signature.asc (189 Bytes)

Just a minor bug fix to the documentation, EmailCompletionLdapServer
must be set. The documentation says “If not set, RTx::EmailCompletion
will search for LdapServer parameter…”, this isn’t the case. If
EmailCompletionLdapServer isn’t set then LDAP isn’t used for
EmailCompletion.

It’s a bug, it should work. I will search for this bug.

Hello,

Just a minor bug fix to the documentation, EmailCompletionLdapServer
must be set. The documentation says “If not set, RTx::EmailCompletion
will search for LdapServer parameter…”, this isn’t the case. If
EmailCompletionLdapServer isn’t set then LDAP isn’t used for
EmailCompletion.

Can’t reproduce this bug. With this /opt/rt3/etc/RT_SiteConfig.pm :

Set($LdapServer, “localhost”);
Set($LdapBase, “dc=me,dc=org”);

It works perfectly here.

Is there someone else with this problem in rc3 (http://gaspard.mine.nu/rtx/) ?

Hello,

I’m also not seeing the grey backgrounds, but haven’t had time to look
at whether that’s a problem with the plugin, or somehow something in our
local setup. I’ll hopefully have time to work with it some more
tomorrow.

Could you try this page : http://gaspard.mine.nu/nc/. Do you see gray
background for the last three lines ? What is your browser ?

I found the problem – there was an old emailcompletion.css from a
previous release in my rt3/local hierarchy that was overriding the new
one.

Thanks for your help…

Mark Roedel
Senior Programmer / Analyst
LeTourneau UniversityFrom: nchuche@gmail.com [mailto:nchuche@gmail.com] On Behalf Of Nicolas
Chuche
Sent: Wednesday, November 14, 2007 6:41 AM
To: Roedel, Mark
Cc: rt-devel@lists.bestpractical.com
Subject: Re: [Rt-devel] RTx::EmailCompletion with LDAP : testers needed

Hello,

I’m also not seeing the grey backgrounds, but haven’t had time to look
at whether that’s a problem with the plugin, or somehow something in
our
local setup. I’ll hopefully have time to work with it some more
tomorrow.

Could you try this page : http://gaspard.mine.nu/nc/. Do you see gray
background for the last three lines ? What is your browser ?

From: nchuche@gmail.com [mailto:nchuche@gmail.com] On Behalf Of Nicolas
Chuche
Sent: Wednesday, November 14, 2007 6:41 AM
To: Roedel, Mark
Cc: rt-devel@lists.bestpractical.com
Subject: Re: [Rt-devel] RTx::EmailCompletion with LDAP : testers needed

Hello,

I’m also not seeing the grey backgrounds, but haven’t had time to look
at whether that’s a problem with the plugin, or somehow something in
our
local setup. I’ll hopefully have time to work with it some more
tomorrow.

Could you try this page : http://gaspard.mine.nu/nc/. Do you see gray
background for the last three lines ? What is your browser ?

BEGIN-ANTISPAM-VOTING-LINKS

Teach CanIt if this mail (ID 9199988) is spam:
Spam:
http://antispam.letu.edu/canit/b.php?i=9199988&m=69c857f574af&c=s
Not spam:
http://antispam.letu.edu/canit/b.php?i=9199988&m=69c857f574af&c=n
Forget vote:
http://antispam.letu.edu/canit/b.php?i=9199988&m=69c857f574af&c=f
END-ANTISPAM-VOTING-LINKS

Hello,

Just a minor bug fix to the documentation, EmailCompletionLdapServer
must be set. The documentation says “If not set, RTx::EmailCompletion
will search for LdapServer parameter…”, this isn’t the case. If
EmailCompletionLdapServer isn’t set then LDAP isn’t used for
EmailCompletion.

Can’t reproduce this bug. With this /opt/rt3/etc/RT_SiteConfig.pm :

Set($LdapServer, “localhost”);
Set($LdapBase, “dc=me,dc=org”);

It works perfectly here.

Ah, it does actually work. I think I had another problem (which I’ve
already fixed). I was looking in lib/RTx/EmailCompletion.pm which made
no mention of LdapServer, I’ve since found where it uses LdapServer.

Apologies for the false alarm!

Andrew Ruthven, Wellington, New Zealand
At home: andrew@etc.gen.nz | This space intentionally
| left blank.

signature.asc (189 Bytes)

Apologies for the false alarm!

No worries and thanks for your help.