ltb-project / white-pages Goto Github PK
View Code? Open in Web Editor NEWA very simple white pages application for your LDAP directory
Home Page: https://white-pages.readthedocs.io
License: GNU General Public License v3.0
A very simple white pages application for your LDAP directory
Home Page: https://white-pages.readthedocs.io
License: GNU General Public License v3.0
Hello,
At 2d51174, to display all entries, there is two methods :
First name = *
-> Click on SearchWhen you set use_gallery = false
in config, you lose second method. It will be nice to keep this second method with use_gallery = false
but to display all entries without photos.
My proposal :
use_gallery = false
option disable photos in White Pages but keep "Directory" menu usable to display all entriesFor the moment all results are displayed in a single page
We should have pagination (different configuration between standard results and gallery)
The must would be to map the pagination to LDAP SSSVLV control to only query visible entries, with http://php.net/manual/en/function.ldap-control-paged-result.php
See my comment on #28.
Two improvements that can be done with Datatables :
On a debian 10 fresh install, i'im trying the white-pages tools ( 0.3-2 deb version)
with this (simplified for testing this issue) configuration file, it's basicaly working :
# /usr/share/white-pages/conf/config.inc.local.php
<?php
$ldap_url = "ldaps://server1.XXXX ldaps://server2.XXXX";
$ldap_base = "dc=XXXX,dc=fr";
$ldap_binddn = "";
$ldap_bindpw = "";
$ldap_user_base = "ou=people,".$ldap_base;
?>
But the display page (if i click form directory or from gallery) got me a empty result :
log of the server say :
[Mon Aug 12 15:53:08.976657 2019] [php7:notice] [pid 13056] [client 172.26.15.30:34988] PHP Notice: Undefined variable: logout_link in /usr/share/white-pages/htdocs/index.php on line 77, referer: http://white-pages.embl.fr/index.php?page=directory
[Mon Aug 12 15:53:09.001657 2019] [php7:notice] [pid 13056] [client 172.26.15.30:34988] PHP Notice: Undefined index: vcard in /usr/share/white-pages/htdocs/display.php on line 61, referer: http://white-pages.embl.fr/index.php?page=directory
[Mon Aug 12 15:53:09.003279 2019] [php7:notice] [pid 13056] [client 172.26.15.30:34988] PHP Notice: Undefined offset: 0 in /usr/share/white-pages/htdocs/display.php on line 82, referer: http://white-pages.embl.fr/index.php?page=directory
[Mon Aug 12 15:53:09.003446 2019] [php7:warn] [pid 13056] [client 172.26.15.30:34988] PHP Warning: Invalid argument supplied for foreach() in /usr/share/white-pages/htdocs/display.php on line 82, referer: http://white-pages.embl.fr/index.php?page=directory
[Mon Aug 12 15:53:09.003535 2019] [php7:notice] [pid 13056] [client 172.26.15.30:34988] PHP Notice: Undefined index: vcard in /usr/share/white-pages/htdocs/display.php on line 92, referer: http://white-pages.embl.fr/index.php?page=directory
[Mon Aug 12 15:53:09.003618 2019] [php7:notice] [pid 13056] [client 172.26.15.30:34988] PHP Notice: Undefined variable: display_edit_link in /usr/share/white-pages/htdocs/display.php on line 100, referer: http://white-pages.embl.fr/index.php?page=directory
[Mon Aug 12 15:53:09.003716 2019] [php7:notice] [pid 13056] [client 172.26.15.30:34988] PHP Notice: Undefined offset: 0 in /usr/share/white-pages/htdocs/display.php on line 107, referer: http://white-pages.embl.fr/index.php?page=directory
It could be interesting to download a VCard of the LDAP entry.
Hi Clément,
nice job, thanks ;-)
Would that be possible to have an option that would allow to format the thumbnails to a fixed height when displaying the directory.
Currently when firstname / name (which are the default attributes displayed under the photo) does'nt fit on one line, then some thumbnails are higher than other which reach to an uggly page displayed.
Nothing critical but a shame.
It's a execllent project. But I encounter a problem during the use. The problem is that how to display the "Apprentice" and "Mentor" attributes in the "Directory" tab . I can not find any key word "Apprentice" or "Mentor" in both the 0.2-1 version and the latestest version source code(master branch in the github ). I download the source codes and execute the shell command "# egrep -i 'Apprentice' white-pages-master -R" in the linux for lookuping these key words . But I find nothing. I do not kow how to implement the "Apprentice" and "Mentor" attributes in the "Directory" tab . It's my doubt.
When debug is enabled, we should force the debug of php-ldap:
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
I've translated to italian white pages, but i don't known how/where send language file.
Please tell me, thanks.
Hello,
When you use menus on WP, you don't see logo which is display on homepage (in the middle).
Is it possible to change its location to see it when you browse through WP menus ?
#28 fix wrong display for Firefox/Chrome.
In memberOf, if some groups are not inside the group base, they can't be found and we have a blank line instead. We should just not display the line.
When I search a name, I get a list of corresponding users but when I click on "Display Entry" for a user, his/her card is empty.
Debugging is on but I see no errors and also no errors in the Apache error log.
Php 7.1, Apache 2.4, Debian Stretch, WhitePages 0.2-2 (Debian Package)
Thx a lot for your work !
Hello,
I need to display objectGUID
attribute in White Pages.
I define a guid
attribute in my config file :
'guid' => array( 'attribute' => 'objectguid', 'faclass' => 'user', 'type' => 'text' ),
With this config, I get following display :
It seems that White Pages try to transform binary data in UTF-8 form.
Could we add a new type of attribute for this data ?
Like we have mailto: for email adress, we could have tel: links for telephone numbers
Hi,
In my ldap scheme (Supann) my users are affected to Organizational Unit entity with own structural classe.
So the spécific attribute name in attribute_map for organizationalunit is "supannentiteaffectation" .For one user is just a entity code that are the RDN of Entity.
I like to display the "description" or "ou" attribute of this Entity ( like team name or bulding name ).
Can i integrate a sub ldap request to display the spécific attribute of entity in place of attribute define in attribute_map ?
Regards,
vlepetit
To display groups, we could first display memberOf/member/uniqueMember attributes with dn_link. A specific displayer can also be done for memberUid.
Then the main LDAP filter can be configured to search on user and groups.
This can be a first solution for #12
Hi,
it's possible to add dropdown list to advanced for some search criteria like team. The list may be contain in ldap or just right in hard list in config files ?
This functionality to help users who don't know the name of all team in organisation and want to know members of differents teams or services..
Regards,
vlepetit
Hello,
Could you add a feature to export a search result to CSV (in a row form) ?
My goal is to print an export for end users.
For the moment, photo is searched in jpegPhoto attribute. We need to let it configurable to be able to use White Pages on Active Directory for example.
Hi,
I don't know if it is foreseen, but is it planned to allow edition for users and groups?
When I do an advanced search by group, I can get the group members. However, I have groups with lots of users and if it was possible to sort the members list, it would be easier to find them.
Congrats for very useful tool! :)
Hello,
As mentioned in Advanced search's doc, search is done :
with an exact or ordering matching
unlike quick search which use :
a substring match (attribute=query)
It will be nice to replace exact matching by substring matching in advanced search to have same behaviors.
Currently, when you do a search with "foo" in quick and advanced search (First name field), results are :
Hello,
On https://ltb-project.org/documentation/white-pages/latest/install_tarball page, we can read :
You should have installed these programs before running Self Service Password:
We should read :
You should have installed these programs before running White Pages :
Self Service Password need to be replace by White Pages.
Hi,
How could i display an url item in each user result page.
The goal it's to give a link or button to redirect to a tools like LdapSaisie, for users who wanted to edit it own data in ldap.
Regads,
vlepetit
Galleries by group as done for directories could be nice.
We don't have any security issue as the bind dn and bind password are read from configuration file, but it is better to fix our code to check the return of ldap_bind method.
I'd like to get a list of groups (as designated by filter) that can then be viewed as normal. Similar to the directory or gallery, but for groups instead of users.
Is there a way to add this?
Hi there!
I know you're at v0.1 and there hopefully will be more versions in the future with new and improved features, but there is one question I'd like to know. Are you planning to keep it "read-only" or are there any plans to add features to make white-pages an alternative to manage ldap (e.g. like phpldapadmin)?
Regards,
Michael
Hello,
It could be nice to have an option in config file to change display of results (rows or boxes).
Advantages of rows results in comparison of boxes results :
Proposal : add a config option display_results
in Full Display's section of config.inc.php
with two values :
Hi,
I'm always on my WP test version 0.3. I see a big change in tab repertory (or register). In WP 0.2 we have a search module who sort the result by page. We do not have in version 0.3 the arrow on top of the colum to sort also.
I doesn't see in documentation if it's a parameter to activate.
thank for all !
Hi,
Is there a way to hide photo box on gallery page if there is no picture ?
Regards,
Hello,
Commit 2f8aca7 changes look and text of print buttons, suggestions :
Complete list
and Current page
are not clear. Replace by :
Print all results
and Print this page
buttonsAll results
and This page
buttons with word Print
(not button) at beginning of the lineIn our Infrastructure, we have a meta ldap (from 4 backend different LDAP) with around 2000 entry
sometime, we got a this error (very shortly like in less than 5 seconds :
LDAP communication error
It's will be great, of course to have the #1 issue fixed, but until it, it's possible to change the timeout connection to the LDAP (i get this error in less than 5 seconds) ?
Next part of #5 : export results as CSV after a search. Currently, export is possible before a search. Consequently, you don't know what you are exporting.
@coudot's comment :
Indeed, but this requires to repost the data from the form, so have an hidden form in results page. Not very clean in the code, but I understand the need. You can open a feature request for this, but I am not sure to do it for the moment.
Hello,
Currently, it is possible to make an LDAP injection when using quick search because $search_query
is use directly in $ldap_filter
.
Steps to reproduce :
c3po)(uid=*sky
With this kind of $search_query
, you can request an LDAP attribute which not mentioned in $quick_search_attributes
.
When WP is used with a ldap DIT such as this:
Integrator needs to configure two identifcal ldap_base for search for users and groups in order to fetch all entries including the ones in sub organizations:
$ldap_base = "dc=acme,dc=com";
$ldap_user_base = $ldap_base;
$ldap_group_base = $ldap_base;
But when two identical ldap_base are configured, the below code in htdocs/display.php will consider that we are fetching a group even though we are actually fetching a user:
# Find object type
if ( preg_match( '/'.$ldap_group_base.'$/i', $dn) ) { $type = "group"; }
else { $type = "user"; }
Resulting in following request being sent to ldap :
Oct 18 15:49:24 vm-zosma slapd[373]: conn=180215 op=1 SRCH base="uid=jdoe,ou=users,o=org1,dc=acme,dc=com" scope=0 deref=0 filter="(|(objectClass=groupOfNames)(objectClass=groupOfUniqueNames))"
Oct 18 15:49:24 vm-zosma slapd[373]: conn=180215 op=1 SRCH attr=cn description member uniquemember memberof cn
Oct 18 15:49:24 vm-zosma slapd[373]: conn=180215 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text=
Quick and dirty fix was to change the offending lines as follow:
if ( preg_match( '/,ou=users,/$i', $dn) ) { $type = "user"; }
else { $type = "group"; }
A solution could be add two config parameters for group and users "ou" potential name(s) ?
Hello,
At 2d51174, when doing a quick search with pattern like "foo*", White Pages just returns "entries found" message without results. Associated search filter (|(uid=*foo**)(cn=*foo**)(mail=*foo**))
White Pages should return same entries found with "foo" pattern.
We can only know which version is installed if we check the package version. We should also store the version number inside the code, for example in index.php
Hello,
Could you add a feature to query several directories ?
According to documentation, you can query one directory currently.
Thanks.
Hi,
I try to display photo to my users in her white page and gallery.
I put photo in
/usr/share/white-pages/htdocs/images
and now i try to give the good name to the file to work but it's don't work...
What is the good file name ?
firstname-lastname.jpg ?
this is the same firstname and last name found in ldap ?
which attribute exactly ?
regards,
vlepetit
Hi,
Is it possible to add a LDAP attribute which is not defined in WP by default.
The attributes I need is the office number (physicalDeliveryOfficeName) and maybe the userAccountControl to see if a user is active or disabled.
I tried to declare in my conf file :
$attributes_map = array(
...
'office' => array( 'attribute' => 'physicalDeliveryOfficeName', 'faclass' => 'building', 'type' => 'text' ),
...
)
In the lang/fr.inc.php, I added this :
$messages['label_office'] = "Bureau";
When I show a user the office number appears Empty.
Is there anything else to do ?
Thanks in advance.
On advanced search page, when label has a quote, it is displayed with '
My ldap has 2000 entries . When I click the "Directory" tab, I find the web page always rolling down following entries until the web page displays all 2000 entries, then the web page will finish paging. The process exhaused a lot of time because of waiting for display 2000 entries. It's terrirble.I think the process need to be optimized for improving user experience. Nobody want to wait. The all entries fetch can be finshied in the backgroup of program ,not in the foregroup.
I find the "Gallery" tab does not use paging action. When the entry numer is huage , the web page will always dislplay the left entry.
It could be useful to be able to answer to Gravatar images requests: https://fr.gravatar.com/site/implement/images/
This requires to scan LDAP directory for emails, compute the HASH, then store this HASH somewhere so White Pages will be able to retrieve the email from the HASH.
Hello,
I would like to suggest two improvements on config file :
config.inc.php
) :# Include local config file
if (file_exists (dirname (__FILE__) . '/config.inc.local.php')) {
include dirname (__FILE__) . '/config.inc.local.php';
}
There is more than one way to do it. This improvement will be very useful to :
config.inc.php
when doing WP upgrades.Will be nice to have same documentation between LTB's wiki and config.inc.php. Currently, LTB's wiki documentation is the most complete.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.