-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[Bug]: Can't set quota from LDAP (or ldap default quota) if display name is not set #59432
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
My server has Nextcloud configured to the LLDAP server for managing accounts and groups. I configure the LDAP app in Nextcloud via occ from a systemd service. The relevant parts of it:
${occ} ldap:set-config s01 ldapUserDisplayName "displayName"
${occ} ldap:set-config s01 ldapQuotaAttribute "${quotaAttribute}"
${occ} ldap:set-config s01 ldapQuotaDefault "${defaultQuota}"
Separately:
defaultQuota = "500 GB";
quotaAttribute = "nextcloudQuota";
I can verify on the web UI that all the LDAP app parameters get set correctly by my script.
When a user in LLDAP has username, email and display name, everything works correctly, the default quota shown by default, and if I change the nextcloudQuota parameter, it will get propagated in Nextcloud.
However, if a user has username and email but NO display name, then the user will have none (Unlimited) as their quota value. So it doesn't get the configured value or the default value either. Having no display name prevents quota and possibly more properties being synced.
Steps to reproduce
- Set up LDAP server (eg. LLDAP)
- Set up Nextcloud with LDAP app configured, with default LDAP quota and LDAP quota attribute correctly set
- Create user in LLDAP, don't set display name
- Set quota from LLDAP
Expected behavior
User has first the default quota then the quota set via LDAP
Nextcloud Server version
32
Operating system
Other
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
Possibly relevant code:
https://github.com/nextcloud/server/blob/stable32/apps/user_ldap/lib/User/User.php#L88-L101
https://github.com/nextcloud/server/blob/stable32/apps/user_ldap/lib/User/User.php#L525-L578
https://github.com/nextcloud/server/blob/stable32/apps/user_ldap/lib/Access.php#L922-L937
Note: this was found by a LLM while debugging my issue.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status