/[A3C]/lib/A3C/LDAP.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/A3C/LDAP.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 47 by dpavlin, Mon Mar 31 21:11:45 2008 UTC revision 59 by dpavlin, Wed Apr 2 17:02:43 2008 UTC
# Line 109  sub count { Line 109  sub count {
109          'Organization',          'Organization',
110          # optional params          # optional params
111          limit => $limit,          limit => $limit,
112            filter => '(uid=foobar)',
113    );    );
114    
115  =cut  =cut
# Line 128  sub collection { Line 129  sub collection {
129          my $filter = $collection2filter->{$model};          my $filter = $collection2filter->{$model};
130          die "unknown model $model" unless $filter;          die "unknown model $model" unless $filter;
131    
132            # add user filter
133            $filter = '(&' . $filter . $args->{filter} . ')' if $args->{filter};
134    
135          $self->search(          $self->search(
136                  base => $self->base,                  base => $self->base,
137                  filter => $filter,                  filter => $filter,
# Line 135  sub collection { Line 139  sub collection {
139          );          );
140    
141          Jifty->log->info(          Jifty->log->info(
142                  "searching LDAP for $model with $filter ",                  "Searching LDAP for $model with $filter ",
143                  $args->{limit} ? 'limit ' . $args->{limit} : '',                  $args->{limit} ? 'limit ' . $args->{limit} . ' ' : '',
144                  'returned ', $self->count, ' results'                  'returned ', $self->count, ' results'
145          );          );
146    

Legend:
Removed from v.47  
changed lines
  Added in v.59

  ViewVC Help
Powered by ViewVC 1.1.26