[Bps-public-commit] RT-Extension-LDAPImport branch, make-existing-users-privileged, created. 0.31-3-g60320c4

Kevin Falcone falcone at bestpractical.com
Wed Nov 2 19:03:11 EDT 2011


The branch, make-existing-users-privileged has been created
        at  60320c429c41e4288a38661e3a25fea0e4b724f0 (commit)

- Log -----------------------------------------------------------------
commit 4dc46f5c15b94eb38bb49d45fc78a327953a4b3d
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Nov 2 18:57:10 2011 -0400

    Add a config variable to make existing users Privileged
    
    Patch provided on 51258

diff --git a/README b/README
index 51ded15..575cd79 100644
--- a/README
+++ b/README
@@ -56,7 +56,8 @@ The LDAP attribute can also be a subroutine reference
 that returns either an arrayref or a list of attributes
 
 By default users are created as Unprivileged, but you can change this by
-setting $LDAPCreatePrivileged to 1.
+setting $LDAPCreatePrivileged to 1.  If the privilege status for users is 
+required to be updated then also set $LDAPUpdateSetsPrivileged to 1.
 
 For more information on these see the import_users documentation
 in RT::Extension::LDAPImport
diff --git a/lib/RT/Extension/LDAPImport.pm b/lib/RT/Extension/LDAPImport.pm
index c6022d7..6757b02 100644
--- a/lib/RT/Extension/LDAPImport.pm
+++ b/lib/RT/Extension/LDAPImport.pm
@@ -146,7 +146,8 @@ If it is an arrayref, the values will be concatenated
 together with a single space.
 
 By default users are created as Unprivileged, but you can change this by
-setting $LDAPCreatePrivileged to 1.
+setting $LDAPCreatePrivileged to 1.  If the privilege status for users is
+required to be updated then also set $LDAPUpdateSetsPrivileged to 1.
 
 =cut
 
@@ -350,6 +351,7 @@ sub create_rt_user {
         if ($RT::LDAPUpdateUsers || $RT::LDAPUpdateOnly) {
             $self->_debug("$message, updating their data");
             if ($args{import}) {
+		$user->{'Privileged'} = $RT::LDAPCreatePrivileged if $RT::LDAPUpdateSetsPrivileged;
                 my @results = $user_obj->Update( ARGSRef => $user, AttributesRef => [keys %$user] );
                 $self->_debug(join("\n", at results)||'no change');
             } else {

commit 60320c429c41e4288a38661e3a25fea0e4b724f0
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Nov 2 19:02:30 2011 -0400

    update documentation to be clearer

diff --git a/README b/README
index 575cd79..7afdfb2 100644
--- a/README
+++ b/README
@@ -56,8 +56,10 @@ The LDAP attribute can also be a subroutine reference
 that returns either an arrayref or a list of attributes
 
 By default users are created as Unprivileged, but you can change this by
-setting $LDAPCreatePrivileged to 1.  If the privilege status for users is 
-required to be updated then also set $LDAPUpdateSetsPrivileged to 1.
+setting $LDAPCreatePrivileged to 1.
+
+RT will make existing RT users found in LDAP Privileged if you set
+$LDAPUpdateSetsPrivileged to 1.
 
 For more information on these see the import_users documentation
 in RT::Extension::LDAPImport
diff --git a/lib/RT/Extension/LDAPImport.pm b/lib/RT/Extension/LDAPImport.pm
index 6757b02..cf542ee 100644
--- a/lib/RT/Extension/LDAPImport.pm
+++ b/lib/RT/Extension/LDAPImport.pm
@@ -146,8 +146,10 @@ If it is an arrayref, the values will be concatenated
 together with a single space.
 
 By default users are created as Unprivileged, but you can change this by
-setting $LDAPCreatePrivileged to 1.  If the privilege status for users is
-required to be updated then also set $LDAPUpdateSetsPrivileged to 1.
+setting $LDAPCreatePrivileged to 1.
+
+RT will make existing RT users found in LDAP Privileged if you set
+$LDAPUpdateSetsPrivileged to 1.
 
 =cut
 

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



More information about the Bps-public-commit mailing list