[Bps-public-commit] RT-Extension-LDAPImport branch, master, updated. 0.20_01-47-g5270c1f
Kevin Falcone
falcone at bestpractical.com
Thu Aug 5 15:46:12 EDT 2010
The branch, master has been updated
via 5270c1fadab5f7ff048e77f6904ebfef4d8d6c4b (commit)
from e7131a4d2460ea6697ecb1e5669ed0e6aed5594f (commit)
Summary of changes:
lib/RT/Extension/LDAPImport.pm | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
- Log -----------------------------------------------------------------
commit 5270c1fadab5f7ff048e77f6904ebfef4d8d6c4b
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Aug 5 15:46:13 2010 -0400
LDAPUpdateOnly being 0 doesn't stop an update from happening
It really only stops Create from being called if the value is true
diff --git a/lib/RT/Extension/LDAPImport.pm b/lib/RT/Extension/LDAPImport.pm
index 8ed9fd1..068c90a 100644
--- a/lib/RT/Extension/LDAPImport.pm
+++ b/lib/RT/Extension/LDAPImport.pm
@@ -616,6 +616,9 @@ or EmailAddress arg passed in.
If $LDAPUpdateOnly is true, we will not create new groups
but we will update existing ones.
+There is currently no way to prevent Group data from being
+clobbered from LDAP.
+
=cut
sub create_rt_group {
@@ -628,17 +631,13 @@ sub create_rt_group {
if ($group_obj->Id) {
my $message = "Group $group->{Name} already exists as ".$group_obj->Id;
- if ($RT::LDAPUpdateOnly) {
- if ($args{import}) {
- $self->_debug("$message, updating their data");
- my @results = $group_obj->Update( ARGSRef => $group, AttributesRef => [keys %$group] );
- $self->_debug(join("\n", at results)||'no change');
- } else {
- print "Found existing group $group->{Name} to update\n";
- $self->_show_group_info( %args, rt_group => $group_obj );
- }
+ if ($args{import}) {
+ $self->_debug("$message, updating their data");
+ my @results = $group_obj->Update( ARGSRef => $group, AttributesRef => [keys %$group] );
+ $self->_debug(join("\n", at results)||'no change');
} else {
- $self->_debug("$message, skipping");
+ print "Found existing group $group->{Name} to update\n";
+ $self->_show_group_info( %args, rt_group => $group_obj );
}
} else {
if ( $RT::LDAPUpdateOnly ) {
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list