LdapNgPlugin

This plugin provides an interface to query an LDAP directory and display the results in a WikiApplication It is a complete rewrite of the Foswiki:Extensions/LdapPlugin by Gerard Hickey to provide greater flexibility and performance based on the Foswiki:Extensions/LdapContrib package.

Syntax Rules

LDAP

%LDAP{(filter=)"filter" ...}%
Query an LDAP directrory.

Parameters:
  • filter: the LDAP query string
  • host: host IP or name to connect to
  • port: port to of the host
  • version: protocol version; possible values: 2,3
  • ssl: use ssl to bind to the server; possible values 0,1
  • base: base dn of the (sub)tree to search in; if base is written in brackets (e.g. 'base="(ou=people)"') then it is prepended to the default base of the LdapContrib
  • scope: scope of search; possible values: sub, base, one
  • format: format string used to display a database record
  • header: header to prepend the output; default: '$dn'
  • footer: footer to appended to the output
  • separator: separator between database records; default: '$n'
  • sort: name of attributes to sort the output
  • reverse: reverse the result set; possible values: on, off; default: off
  • limit: maximum number of records to return; default: 0 (unlimited)
  • skip: number of records in the hit set to skip before displaying them; default: 0
  • exclude: regular expression matched against the dn of a returned record. the record will be skipped if it matches.
  • casesensitive: switch this to off for the exclude and include parameter to operate in case-insensitive mode
  • include: regular expression matched against the dn of a returned record. not matching record will be skipped.
  • hidenull: wether to hide any output on an empty hit set; possible values: on, off; default: off
  • clear: comma separated list of attributes to be removed from the output if they are not resolved
  • cache: time in seconds the result of the ldap query will be cached and not fetched anew; defaults to $Foswiki::cfg{Ldap}{DefaultCacheExpire}, or 0 if not set.
  • blob: comma separated list of attributes to be handled as blobs, like images stored in your LDAP directory.

Cgi Parameters:
  • refresh: refresh the cache of blobs (i.e. jpegPhotos); possible values: on, off, ldap; default: off;

The header, format and footer format strings may contain the following variables:
  • $percnt: % sign
  • $dollar: $ sign
  • $n: newline
  • $count: the number of hits
  • $index: the record number
  • $<attr-name>: the value of the record attribute <attr-name>

LDAPUSERS

%LDAPUSERS{...}%
List all LDAP userinformation. Information is drawn from cache and not from the LDAP server. Use ?refreshldap=on to update.

Parameters:
  • format: format string used to display a user record
  • header: header to prepend the output
  • footer: footer to appended to the output
  • sep: separator between database records; default: '$n'
  • limit: maximum number of records to return; default: 0 (unlimited)
  • skip: number of records in the hit set to skip before displaying them; default: 0
  • include: regular expression a user's WikiName must match to be included in the output
  • exclude: regular expression a user's WikiName must not match
  • casesensitive: switch this to off for the exclude and include parameter to operate in case-insensitive mode
  • hideunknown: on/off, enable/disable filtering out users that did not log in yet and thus have no hometopic (e.g. created by Foswiki:Extensions/NewUserPlugin), defaults to 'on'

The format string may contain the following variables:
  • $percnt: % sign
  • $dollar: $ sign
  • $n: newline
  • $index: the record number
  • $wikiName: the user's WikiName
  • $loginName: the user's login name
  • $displayName: a link pointing to the users hometopic in the Main web, if it exists, and '<nop>$wikiName' otherwise
  • $emails: the list of all known email addresses

Examples

Nr Name Mail Telephone
1 aihaoqiang    
2 atlas Admin    
3 Yan Binbin    
4 bes Admin    
5 cepc Admin    
6 Chang Ningbo    
7 chen ding    
8 Cheng Jie    
9 Chen Kaibao    
10 Chen Liming    
11 CHEN Quanyou    
12 Deng Jian    
13 Ding Weimin    
14 Ding Yitian    
15 BES3 Dirac    
16 Dong Hui    
17 duan yanyun    
18 Du Yanyan    
19 dyb Admin    
20 Cao Duanyun    
21 Feng Cunfeng    
22 Jiang Fan    
23 Ge Peng    
24 Gong Xue    
25 Han jingyi    
26 Han tingting    
27 han yutong    
28 Har Lan    
29 HEI Ze    
30 He Minghe    
31 HEP Software    
32 Huang wenhao    
33 Huang Xingtao    
34 Huang Yingsheng    
35 LI Huiling    
36 Hu Jiayu    
37 Hu Xiaobin    
38 IHEP Admin    
39 jiang houbing    
40 Jiang Tianhui    
41 Jiang Xiuqing    
42 Dong Jianing    
43 juno Admin    
44 Wang Ji Yingmei    
45 Kong Fangang    
46 lhaaso Admin    
47 liang zihan    
48 Liang Zuotang    
49 Li Bo    
50 LI Chao    
51 li chenyang    
52 li changyu    
53 Li Jinyu    
54 Li Ke    
55 Li Long    
56 li chenyang    
57 lin xinyi    
58 Li Qiyun    
59 LI Ruhui    
60 Li Shiyuan    
61 liushuqing    
62 Li Teng    
63 Liu Bo    
64 LIU Jian    
65 Liu Peilian    
66 LIU Qingyuan    
67 LIU Xiaoyang    
68 liu yanfeng    
69 LIU Yin    
70 Li wenlong    
71 Ma Lianliang    
72 MENG Lu    
73 SHEN Lei    
74 Luo Yonggang    
75 Yuming Ma    
76 MA Yaopeng    
77 He Mao    
78 WANG Meng    
79 Nian Guoen    
80 NSQ 2015    
81 pandax Admin    
82 Shankar Pathak    
83 LU Peng    
84 Qin Liqing    
85 qiumingwei    
86 REN Xiangxiang    
87 Nasir Shaheed    
88 Shao Ruobin    
89 Shen Fuwang    
90 Taiwansimon    
91 Song Deheng    
92 song jiaojiao    
93 song yuanhe    
94 star Admin    
95 Sui fengfei    
96 Sun Feng    
97 Tao Li    
98 Khuram Tariq    
99 thppc Admin    
100 Tian Ye    

Nr Group Members
1 guest hepguest
2 aihq  
3 atlas fengcf
4 bbyan  
5 bes huangxt
6 cepc  
7 changnb  
8 chend  
9 chengjie  
10 chenkb  
11 chenlm  
12 chenqy  
13 dengj  
14 dingwm  
15 dingyt  
16 dongh  
17 duanyy  
18 duyy  
19 dyb chenqy
20 dycao  
21 fengcf  
22 fjiang  
23 gep  
24 gongxue  
25 hanjyi  
26 Hantingting  
27 hanyt  
28 harlan  
29 heiz  
30 hemh  
31 hepsw dyb
32 hmzhang  
33 huangwh  
34 huangxt  
35 huangys  
36 huiling  
37 hujy  
38 huxb  
39 iheproot  
40 jianghb  
41 jiangth  
42 jiangxq  
43 jiaojb  
44 jndong  
45 juno huangxt
46 jymwang  
47 kongfg  
48 lhaaso fengcf
49 liangzh  
50 liangzt  
51 libo  
52 lichao  
53 lichy  
54 licy  
55 lijy  
56 like  
57 lilong  
58 linchy  
59 linxy  
60 liqiy  
61 lirh  
62 lishy  
63 lisq  
64 liteng  
65 liub  
66 liuj  
67 liupl  
68 liuqy  
69 liuxy  
70 liuyf  
71 liuyin  
72 liwenl  
73 lixl  
74 llma  
75 lmeng  
76 lshen  
77 luoyg  
78 maym  
79 mayp  
80 meijc  
81 mhe  
82 mwang  
83 niangn  
84 nsq2015  
85 pandax bbyan
86 pathak  
87 plu  
88 qinlq  
89 qiumw  
90 renxx  
91 shaheed  
92 shaorb  
93 shenfw  
94 simon  
95 songdh  
96 songjj  
97 songyh  
98 star dengj
99 suiff  
100 sunf  

  1. Main.CaoDuanyun
  2. Main.ChenLiming
  3. Main.ChenQuanyou
  4. Main.ChengJie
  5. Main.DingWeimin
  6. Main.DingXiaotong
  7. Main.DongHui
  8. Main.DongJianing
  9. Main.DuYanyan
  10. Main.DuanYanyun

Plugin Settings

The LdapNgPlugin will use the default configuration of the LdapContrib in your LocalSite.cfg file, that is
  • $Foswiki::cfg{Ldap}{Host} (overridable per query)
  • $Foswiki::cfg{Ldap}{Port} (overridable per query)
  • $Foswiki::cfg{Ldap}{Base} (overridable per query)
  • $Foswiki::cfg{Ldap}{Version} (overridable per query)
  • $Foswiki::cfg{Ldap}{SSL} (overridable per query)
  • $Foswiki::cfg{Ldap}{BindDN}
  • $Foswiki::cfg{Ldap}{BindPasswd}

Plugin Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Dependencies

NameVersionDescription
Foswiki::Contrib::LdapContrib>=5.03Required
Cache::Cache>=1.05Required

Plugin Info

Plugin Author: Michael Daum
Copyright ©: 2006-2012 Michael Daum http://michaeldaumconsulting.com
License: GPL (GNU General Public License)
Release: 5.03
Version: 16128 (2012-11-29)
Change History:  
29 Nov 2012: fixed performance problem for simple queries; fixes due to the latest changes in LdapContrib; fixed too many open file handles on long running solrindexing; don't index empty email fields using SolrPlugin
21 Nov 2012: fixed switching off the %LDAP cache when there's a global default; rewrite of formatting code; fixed fetching referrenced objects
19 Nov 2012: added casesensitive include/excluding
09 Nov 2012: added integration into SolrPlugin's index process by augmenting user profiles with ldap attributes
20 Dec 2011: added cache paremeter to %LDAP
17 Nov 2010: added exclude and include parameter to %LDAP
17 Nov 2009: renamed sep parameter to separator for consistency
27 Jan 2009: syncing version number with LdapContrib
08 Jan 2009: ported to foswiki
12 Jun 2008: fixed yet another "sep" problem
13 Nov 2007: fixed $nop
01 Oct 2007: added LDAPUSERS, lined up to changes in LdapContrib-2.0
04 June 2007: don't convert from/to utf8 if the site charset is already utf8
18 Dec 2006: added support for addresses as specified in RFC4517
04 Dec 2006: map utf8 strings from LDAP to the site's encoding and vice versa
30 Nov 2006: replaced commonTagsHandler with a properly registered LDAP tag
31 Aug 2006: added NO_PREFS_IN_TOPIC
19 Jul 2006: public release
25 April 2006: Initial (internal) version
Plugin Home: Foswiki:Extensions/LdapNgPlugin
Support: Foswiki:Support/LdapNgPlugin
主题版本: r1 - 2007-01-02, ProjectContributor
 
This site is powered by Foswiki版权所有 © 所有作者。本合作平台的所有资料归内容提贡者所有。
回馈有关 HEPG 的建议、需求及问题。