Allow custom name attribute in LDAP #1071

Closed
opened 2026-02-04 23:40:38 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @craftbyte on GitHub (Mar 2, 2019).

Describe the feature you'd like
I would like to be able to set the name attribute in LDAP just like I can set the mail attribute. We use a Windows AD server and the actual names are mostly stored in the displayName attribute instead of cn.

Describe the benefits this feature would bring to BookStack users
This would allow BookStack to be used in environments where the name attribute is not cn.

Originally created by @craftbyte on GitHub (Mar 2, 2019). **Describe the feature you'd like** I would like to be able to set the name attribute in LDAP just like I can set the mail attribute. We use a Windows AD server and the actual names are mostly stored in the `displayName` attribute instead of `cn`. **Describe the benefits this feature would bring to BookStack users** This would allow BookStack to be used in environments where the name attribute is not `cn`.
OVERLORD added the 🛠️ Enhancement📖 Docs Update🏭 Back-End labels 2026-02-04 23:40:38 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 8, 2019):

Thanks for the suggestion @craftbyte, I can see how this would be useful.
I have assigned this to be done for the next feature release.

Note for reference

LdapService@getUserDetails, Copy setup for email attribute.

@ssddanbrown commented on GitHub (Mar 8, 2019): Thanks for the suggestion @craftbyte, I can see how this would be useful. I have assigned this to be done for the next feature release. #### Note for reference LdapService@getUserDetails, Copy setup for email attribute.
Author
Owner

@dfanara commented on GitHub (Mar 9, 2019):

I've worked on the changes for this issue, but I'm having issues with the unit tests.

I haven't been able to get the tests on the master branch to pass, so I haven't started writing tests for this feature. I'm running phpunit version 6.5.14, setup the bookstack-test databases and ran the migrations.

The majority of the tests are failing with errors similar to this:

Expected status code 200 but received 419.
Failed asserting that false is true.

Is this expected behavior on the master branch?

Edit: I got the unit tests to pass, I think I just needed to clear the config cache.

@dfanara commented on GitHub (Mar 9, 2019): I've worked on the changes for this issue, but I'm having issues with the unit tests. I haven't been able to get the tests on the master branch to pass, so I haven't started writing tests for this feature. I'm running phpunit version 6.5.14, setup the bookstack-test databases and ran the migrations. The majority of the tests are failing with errors similar to this: ``` Expected status code 200 but received 419. Failed asserting that false is true. ``` Is this expected behavior on the master branch? **Edit:** I got the unit tests to pass, I think I just needed to clear the config cache.
Author
Owner

@ssddanbrown commented on GitHub (Mar 10, 2019):

Functionality now implemented as per #1317. Will be in the next patch release.

@ssddanbrown commented on GitHub (Mar 10, 2019): Functionality now implemented as per #1317. Will be in the next patch release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1071