diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 8 | ||||
-rw-r--r-- | apps/user_ldap/lib/Access.php | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 597e6ebef90..6a467e9eff2 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -144,6 +144,8 @@ class File extends Node implements IFile { } else { // upload file directly as the final path $partFilePath = $this->path; + + $this->emitPreHooks($exists); } // the part file and target file might be on a different storage in case of a single file storage (e.g. single file share) @@ -188,11 +190,7 @@ class File extends Node implements IFile { try { $view = \OC\Files\Filesystem::getView(); - if ($view) { - $run = $this->emitPreHooks($exists); - } else { - $run = true; - } + $run = ($view && $needsPartFile) ? $this->emitPreHooks($exists) : true; try { $this->changeLock(ILockingProvider::LOCK_EXCLUSIVE); diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 0cbe8fd3028..0c87bd9c069 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -537,9 +537,11 @@ class Access extends LDAPUtility implements IUserTools { if($isUser) { $mapper = $this->getUserMapper(); $nameAttribute = $this->connection->ldapUserDisplayName; + $filter = $this->connection->ldapUserFilter; } else { $mapper = $this->getGroupMapper(); $nameAttribute = $this->connection->ldapGroupDisplayName; + $filter = $this->connection->ldapGroupFilter; } //let's try to retrieve the Nextcloud name from the mappings table @@ -563,9 +565,9 @@ class Access extends LDAPUtility implements IUserTools { } if(is_null($ldapName)) { - $ldapName = $this->readAttribute($fdn, $nameAttribute); + $ldapName = $this->readAttribute($fdn, $nameAttribute, $filter); if(!isset($ldapName[0]) && empty($ldapName[0])) { - \OCP\Util::writeLog('user_ldap', 'No or empty name for '.$fdn.'.', \OCP\Util::INFO); + \OCP\Util::writeLog('user_ldap', 'No or empty name for '.$fdn.' with filter '.$filter.'.', \OCP\Util::INFO); return false; } $ldapName = $ldapName[0]; |