Coder Social home page Coder Social logo

ltb-project / white-pages Goto Github PK

View Code? Open in Web Editor NEW
61.0 15.0 26.0 5.82 MB

A very simple white pages application for your LDAP directory

Home Page: https://white-pages.readthedocs.io

License: GNU General Public License v3.0

PHP 66.37% Smarty 24.26% CSS 2.02% Makefile 0.33% Shell 1.51% Dockerfile 1.56% JavaScript 3.95%
white-pages ldap whitepages openldap

white-pages's People

Contributors

coudot avatar faust64 avatar nqb avatar philhaworteks avatar proxyconcept avatar sblaisot avatar soisik avatar sophieqc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

white-pages's Issues

Sorting and paging regression

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.

0.2 :
image

0.3 :
image

I doesn't see in documentation if it's a parameter to activate.

thank for all !

Feature request : Export results as CSV **after** a search.

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.

Displaying binary data attributes

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 :
objectguid

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 ?

add dropdown list to advanced search criteria

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

Improve browsing on pages with Datatables

See my comment on #28.

Two improvements that can be done with Datatables :

  • Browsing buttons at the top of pages. Currently, only at the end of pages.
  • Possibility to go on specific page. Currently, if you have 50 pages and you want to go on page 12, it's really painful.

No information is displayed when opening user details in a multi-organizational DIT

When WP is used with a ldap DIT such as this:

  • users
  • groups
  • org1
    • users
    • groups
    • orgs11
      • users
      • groups
    • ...
  • org2
    • users
    • groups
  • ...

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) ?

Sort group members

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! :)

Do not display not found groups/users

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.

Replace exact matching by substring matching in advanced search

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 :

  • X entries found (quick search)
  • No entries found (advanced search)

"Display Entry" is empty for the result of a search

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 !

Text and look for print buttons

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 buttons
      or
    • All results and This page buttons with word Print (not button) at beginning of the line
  • Separate buttons (currently they are dangerously close)

Italian language file

I've translated to italian white pages, but i don't known how/where send language file.
Please tell me, thanks.

Directory thumbnail frame are unformatted

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.

Print results as rows or boxes

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 :

  • you can print directly HTML page for end users;
  • you can sort results by columns;
  • you can display more information on results page;

Proposal : add a config option display_results in Full Display's section of config.inc.php with two values :

  • rows
  • boxes

[Security] LDAP Injection in quick search

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 :

With this kind of $search_query, you can request an LDAP attribute which not mentioned in $quick_search_attributes.

Config.inc.php : include local file and document variables

Hello,

I would like to suggest two improvements on config file :

adding following code at end of file to include a local config file (that overrides 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 :

  1. keep an up-to-date config.inc.php when doing WP upgrades.
  2. customize simply WP installation

syncing documentation between LTB's wiki and config.inc.php

Will be nice to have same documentation between LTB's wiki and config.inc.php. Currently, LTB's wiki documentation is the most complete.

Display specific Attribute of user's Organizational Unit with own structural classe

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

Plans for a full ldap management?

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

Add display for member/memberOf attributes

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

How to display the "Apprentice" and "Mentor" attributes in the "Directory" tab ?

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.

Quick search not match

Hi everyone,

I'm just installing White Pages 0.3 (git version) on my test environnent. I use White Pages 0.2 on my production site.

I can see when i use quick search the result is not display, like this :
image

But when i use advanced search we have the correct display :
image

Thank for help

Display account : empty result

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;
?>
  • Directory is working
  • Gallery is working
  • advancedsearch with multiple items found is working
  • adancesearch with only one result is working (got first name, last name , ... )

But the display page (if i click form directory or from gallery) got me a empty result :

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

Quick search return with pattern like "foo*"

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.

add a option to change timeout of ldap connexion

In 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) ?

Display all entries with use_gallery = false

Hello,

At 2d51174, to display all entries, there is two methods :

  1. Click on Advanced search -> First name = * -> Click on Search
    or
  2. Click on Gallery

When 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 :

  • Replace "Gallery" menu by "Directory" menu
  • use_gallery = false option disable photos in White Pages but keep "Directory" menu usable to display all entries

Add an attribute which doesn't exist in WP

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.

Logo not visible on other pages than homepage

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 ?

Gallery and photo filename in whites page

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

The "Directory" tab of white page have paging problem when ldap has a lot of entries.

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.

Can we get a list of all groups

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.