mirror of
https://git.unistra.fr/aius/root/ldap-overleaf-sl.git
synced 2025-05-04 19:55:26 +02:00
commit
9cde93be05
4 changed files with 8 additions and 5 deletions
|
@ -16,6 +16,7 @@ If you upgrade from an older commit:
|
||||||
**Note**:
|
**Note**:
|
||||||
- you have to add: uid=%u to your BIND_DN
|
- you have to add: uid=%u to your BIND_DN
|
||||||
- LDAP_GROUP_FILTER is now named LDAP_USER_FILTER
|
- LDAP_GROUP_FILTER is now named LDAP_USER_FILTER
|
||||||
|
- Import of contacts from LDAP is now controlled by LDAP_CONTACT_FILTER
|
||||||
|
|
||||||
|
|
||||||
Only valid LDAP users or email users registered by an admin can login.
|
Only valid LDAP users or email users registered by an admin can login.
|
||||||
|
@ -103,16 +104,18 @@ LDAP_USER_FILTER: '(&(memberof=GROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)(uid=%u))'
|
||||||
#LDAP_ADMIN_GROUP_FILTER: '(memberof=cn=ADMINGROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)'
|
#LDAP_ADMIN_GROUP_FILTER: '(memberof=cn=ADMINGROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)'
|
||||||
ALLOW_EMAIL_LOGIN: 'false'
|
ALLOW_EMAIL_LOGIN: 'false'
|
||||||
|
|
||||||
# All users in the LDAP_GROUP_FILTER are loaded from the ldap server into contacts.
|
# All users in the LDAP_CONTACT_FILTER are loaded from the ldap server into contacts.
|
||||||
|
LDAP_CONTACT_FILTER: (objectClass=person)
|
||||||
LDAP_CONTACTS: 'false'
|
LDAP_CONTACTS: 'false'
|
||||||
```
|
```
|
||||||
|
|
||||||
### LDAP Contacts
|
### LDAP Contacts
|
||||||
|
|
||||||
If you enable LDAP_CONTACTS, then all users in LDAP_USER_FILTER are loaded from the ldap server into the contacts.
|
If you enable LDAP_CONTACTS, then all users in LDAP_CONTACT_FILTER are loaded from the ldap server into the contacts.
|
||||||
At the moment this happens every time you click on "Share" within a project.
|
At the moment this happens every time you click on "Share" within a project.
|
||||||
if you want to enable this function set:
|
if you want to enable this function set:
|
||||||
```
|
```
|
||||||
|
LDAP_CONTACT_FILTER: (objectClass=person)
|
||||||
LDAP_CONTACTS: 'true'
|
LDAP_CONTACTS: 'true'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ services:
|
||||||
LDAP_ADMIN_GROUP_FILTER: '(memberof=cn=ADMINGROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)'
|
LDAP_ADMIN_GROUP_FILTER: '(memberof=cn=ADMINGROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)'
|
||||||
ALLOW_EMAIL_LOGIN: 'true'
|
ALLOW_EMAIL_LOGIN: 'true'
|
||||||
|
|
||||||
# All users in the LDAP_USER_FILTER are loaded from the ldap server into contacts.
|
# All users in the LDAP_CONTACT_FILTER are loaded from the ldap server into contacts.
|
||||||
LDAP_CONTACTS: 'false'
|
LDAP_CONTACTS: 'false'
|
||||||
|
|
||||||
# Same property, unfortunately with different names in
|
# Same property, unfortunately with different names in
|
||||||
|
|
|
@ -156,7 +156,7 @@ services:
|
||||||
LDAP_ADMIN_GROUP_FILTER: '(memberof=cn=ADMINGROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)'
|
LDAP_ADMIN_GROUP_FILTER: '(memberof=cn=ADMINGROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)'
|
||||||
ALLOW_EMAIL_LOGIN: 'true'
|
ALLOW_EMAIL_LOGIN: 'true'
|
||||||
|
|
||||||
# All users in the LDAP_USER_FILTER are loaded from the ldap server into contacts.
|
# All users in the LDAP_CONTACT_FILTER are loaded from the ldap server into contacts.
|
||||||
LDAP_CONTACTS: 'false'
|
LDAP_CONTACTS: 'false'
|
||||||
|
|
||||||
# Same property, unfortunately with different names in
|
# Same property, unfortunately with different names in
|
||||||
|
|
|
@ -100,7 +100,7 @@ module.exports = ContactsController = {
|
||||||
// get user data
|
// get user data
|
||||||
try {
|
try {
|
||||||
// if you need an client.bind do it here.
|
// if you need an client.bind do it here.
|
||||||
const {searchEntries,searchReferences,} = await client.search(ldap_base, {scope: 'sub',filter: process.env.LDAP_USER_FILTER ,});
|
const {searchEntries,searchReferences,} = await client.search(ldap_base, {scope: 'sub',filter: process.env.LDAP_CONTACT_FILTER ,});
|
||||||
await searchEntries;
|
await searchEntries;
|
||||||
for (var i = 0; i < searchEntries.length; i++) {
|
for (var i = 0; i < searchEntries.length; i++) {
|
||||||
var entry = new Map()
|
var entry = new Map()
|
||||||
|
|
Loading…
Add table
Reference in a new issue