[Bps-public-commit] rt-authen-externalauth branch, multiple-emails, updated. 0.09-47-gebf1cf5

Ruslan Zakirov ruz at bestpractical.com
Sat May 14 16:15:16 EDT 2011


The branch, multiple-emails has been updated
       via  ebf1cf58ecae778d0b4d502cf76dd37f93d7d47d (commit)
       via  cf6af332181d44b72f350f7a78457be680ea6fee (commit)
       via  03fd32ded0592dad2ee6f694a4ccd5d2c60615c0 (commit)
       via  e512864dd8d7aedd1c7fc7337ac0ffa295dbacaf (commit)
       via  9a3b47c64b3223d5e92e91400d13293ca5a9b1b9 (commit)
      from  bddaadc881608efe49bb93c7265348558a5e06d8 (commit)

Summary of changes:
 ChangeLog                     |    8 +++++
 README                        |    2 +-
 lib/RT/Authen/ExternalAuth.pm |   71 +++++++++++++++++++++++++++++++++++-----
 3 files changed, 71 insertions(+), 10 deletions(-)

- Log -----------------------------------------------------------------
commit 9a3b47c64b3223d5e92e91400d13293ca5a9b1b9
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat May 14 14:00:13 2011 +0400

    drop inline tests

diff --git a/lib/RT/Authen/ExternalAuth.pm b/lib/RT/Authen/ExternalAuth.pm
index b3321ed..80e426c 100644
--- a/lib/RT/Authen/ExternalAuth.pm
+++ b/lib/RT/Authen/ExternalAuth.pm
@@ -15,12 +15,6 @@ our $VERSION = '0.09';
   It also allows for authenticating cookie information against an
   external database through the use of the RT-Authen-CookieAuth extension.
 
-=begin testing
-
-ok(require RT::Authen::ExternalAuth);
-
-=end testing
-
 =cut    
 
 use RT::Authen::ExternalAuth::LDAP;

commit e512864dd8d7aedd1c7fc7337ac0ffa295dbacaf
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat May 14 14:01:37 2011 +0400

    delete indent from POD

diff --git a/lib/RT/Authen/ExternalAuth.pm b/lib/RT/Authen/ExternalAuth.pm
index 80e426c..550658c 100644
--- a/lib/RT/Authen/ExternalAuth.pm
+++ b/lib/RT/Authen/ExternalAuth.pm
@@ -4,16 +4,16 @@ our $VERSION = '0.09';
 
 =head1 NAME
 
-  RT::Authen::ExternalAuth - RT Authentication using External Sources
+RT::Authen::ExternalAuth - RT Authentication using External Sources
 
 =head1 DESCRIPTION
 
-  A complete package for adding external authentication mechanisms
-  to RT. It currently supports LDAP via Net::LDAP and External Database
-  authentication for any database with an installed DBI driver.
+A complete package for adding external authentication mechanisms
+to RT. It currently supports LDAP via Net::LDAP and External Database
+authentication for any database with an installed DBI driver.
 
-  It also allows for authenticating cookie information against an
-  external database through the use of the RT-Authen-CookieAuth extension.
+It also allows for authenticating cookie information against an
+external database through the use of the RT-Authen-CookieAuth extension.
 
 =cut    
 

commit 03fd32ded0592dad2ee6f694a4ccd5d2c60615c0
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat May 14 14:24:57 2011 +0400

    typo in docs

diff --git a/README b/README
index 4696bcc..85d1350 100644
--- a/README
+++ b/README
@@ -23,7 +23,7 @@ to visit Configuration -> Tools -> System Configuration to find your
 plugin root.
 
 =========================
-Import Version Notes:
+Important Version Notes:
 =========================
 
 If you are using RT 3.6, you want to use the 0.05 version.

commit cf6af332181d44b72f350f7a78457be680ea6fee
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat May 14 14:25:13 2011 +0400

    update changelog

diff --git a/ChangeLog b/ChangeLog
index 700a971..8ef4d21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+0.10
+    * avoid some user create/update conflicts when module enabled
+      on old system
+    * enable $AutoCreate config option for accounts created through
+      email submission
+    * support mapping user's field in RT to multiple attributes
+      in external source (LDAP/DBI)
+
 0.09 2011-05-06 Kevin Falcone
 	* compatibility fixes for 3.8.10 and 4.0.0
 	* author testsuite

commit ebf1cf58ecae778d0b4d502cf76dd37f93d7d47d
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sun May 15 00:14:51 2011 +0400

    add documentation

diff --git a/lib/RT/Authen/ExternalAuth.pm b/lib/RT/Authen/ExternalAuth.pm
index 550658c..960b888 100644
--- a/lib/RT/Authen/ExternalAuth.pm
+++ b/lib/RT/Authen/ExternalAuth.pm
@@ -15,6 +15,57 @@ authentication for any database with an installed DBI driver.
 It also allows for authenticating cookie information against an
 external database through the use of the RT-Authen-CookieAuth extension.
 
+=head1 CONFIGURATION
+
+=head2 Generic
+
+=head3 attr_match_list
+
+The list of RT attributes that uniquely identify a user. It's
+recommended to use 'Name' and 'EmailAddress' to save
+encountering problems later. Example:
+
+    'attr_match_list' => [
+        'Name',
+        'EmailAddress', 
+        'RealName',
+        'WorkPhone', 
+    ],
+
+=head3 attr_map
+
+Mapping of RT attributes on to attributes in the external source.
+Example:
+
+    'attr_map' => {
+        'Name'         => 'sAMAccountName',
+        'EmailAddress' => 'mail',
+        'Organization' => 'physicalDeliveryOfficeName',
+        'RealName'     => 'cn',
+        ...
+    },
+
+Since version 0.10 it's possible to map one RT field to multiple
+external attributes, for example:
+
+    attr_map => {
+        EmailAddress => ['mail', 'alias'],
+        ...
+    },
+
+Note that only one value storred in RT. However, search goes by
+all external attributes if such RT field list in L</attr_match_list>.
+On create or update entered value is used as long as it's valid.
+If user didn't enter value then value stored in the first external
+attribute is used. Config example:
+
+    attr_match_list => ['Name', 'EmailAddress'],
+    attr_map => {
+        Name         => 'account',
+        EmailAddress => ['mail', 'alias'],
+        ...
+    },
+
 =cut    
 
 use RT::Authen::ExternalAuth::LDAP;
@@ -733,6 +784,14 @@ sub FindRecordsByOtherFields {
     return;
 }
 
+=head2 WorkaroundAutoCreate
+
+RT has C<$AutoCreate> option in the config. However, up to RT 4.0.0 this
+option is no used when account created by incomming email. This module
+workarounds this problem.
+
+=cut
+
 sub WorkaroundAutoCreate {
     my $user = shift;
     my $args = shift;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list