user_ldap icon indicating copy to clipboard operation
user_ldap copied to clipboard

occ user:sync 'OCA\User_LDAP\User_Proxy' overwrites manual quotas since update to version 0.10.0

Open icyground opened this issue 7 years ago • 1 comments

Hi guys, since I updated the user_ldap app to version 0.10.0 via market, every time I sync my ldap users via occ user:sync 'OCA\User_LDAP\User_Proxy' the manually set quotas get overwritten to default. This is behavior is only reproducible with version 0.10.0 and does not appear in version 0.9.1. Our LDAP does not deliver any quota values to user_ldap in general.

Steps to reproduce

  • set a quota for a user in owncloud webinterface
  • run php occ user:sync 'OCA\User_LDAP\User_Proxy'
  • check quota of user again, its set to default

Expected behaviour

  • manual quotas should not be touched while theres no value from LDAP Server

Server configuration

Operating system: Ubuntu 16.04 Web server: apache Database: mysql PHP version: PHP 7.0.22 ownCloud version: 10.0.4 Where did you install ownCloud from: owncloud repository List of activated apps:

Enabled:
  - activity: 2.3.6
  - additional_groups: 0.2
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.3.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_sharing: 0.10.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - imprint: 0.2.5
  - market: 0.2.3
  - notifications: 0.3.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
  - user_ldap: 0.10.0
  - user_sql: 2.3
Disabled:
  - encryption
  - external
  - security
  - templateeditor
  - theme-example
  - user_external

Are you using external storage, if yes which one: no Are you using encryption: no Are you using an external user-backend, if yes which one: LDAP, user_sql (self modificated plugin for authentication against a 3rd user source)

LDAP configuration (delete this part if not used)

| ldap_quota_attr                   ||
| ldap_quota_def                    ||

Bad workaround

For temporary solution I found this workaround:

diff --git a/lib/User_Proxy.php b/lib/User_Proxy.php
index b42fe65..574f48e 100644
--- a/lib/User_Proxy.php
+++ b/lib/User_Proxy.php
@@ -34,7 +34,7 @@ use OCP\User\IProvidesExtendedSearchBackend;
 use OCP\User\IProvidesQuotaBackend;
 use OCP\UserInterface;

-class User_Proxy extends Proxy implements IUserBackend, UserInterface, IProvidesQuotaBackend, IProvidesExtendedSearchBackend, IProvidesEMailBackend {
+class User_Proxy extends Proxy implements IUserBackend, UserInterface, IProvidesExtendedSearchBackend, IProvidesEMailBackend {

        /**
         * @var User_LDAP[]

icyground avatar Jan 17 '18 13:01 icyground