Merge pull request #6677 from nextcloud/downstream-dont-reset-quota
don't reset quota
This commit is contained in:
commit
7de6f7cd07
|
@ -436,8 +436,8 @@ class Connection extends LDAPUtility {
|
||||||
|| ($agent !== '' && $pwd === '')
|
|| ($agent !== '' && $pwd === '')
|
||||||
) {
|
) {
|
||||||
\OCP\Util::writeLog('user_ldap',
|
\OCP\Util::writeLog('user_ldap',
|
||||||
$errorStr.'either no password is given for the'.
|
$errorStr.'either no password is given for the '.
|
||||||
'user agent or a password is given, but not an'.
|
'user agent or a password is given, but not an '.
|
||||||
'LDAP agent.',
|
'LDAP agent.',
|
||||||
\OCP\Util::WARN);
|
\OCP\Util::WARN);
|
||||||
$configurationOK = false;
|
$configurationOK = false;
|
||||||
|
|
|
@ -529,7 +529,6 @@ class User {
|
||||||
$targetUser->setQuota($quota);
|
$targetUser->setQuota($quota);
|
||||||
} else {
|
} else {
|
||||||
$this->log->log('not suitable default quota found for user ' . $this->uid . ': [' . $defaultQuota . ']', \OCP\Util::WARN);
|
$this->log->log('not suitable default quota found for user ' . $this->uid . ': [' . $defaultQuota . ']', \OCP\Util::WARN);
|
||||||
$targetUser->setQuota('default');
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->log->log('trying to set a quota for user ' . $this->uid . ' but the user is missing', \OCP\Util::ERROR);
|
$this->log->log('trying to set a quota for user ' . $this->uid . ' but the user is missing', \OCP\Util::ERROR);
|
||||||
|
|
|
@ -453,9 +453,8 @@ class UserTest extends \Test\TestCase {
|
||||||
->will($this->returnValue(false));
|
->will($this->returnValue(false));
|
||||||
|
|
||||||
$user = $this->createMock('\OCP\IUser');
|
$user = $this->createMock('\OCP\IUser');
|
||||||
$user->expects($this->once())
|
$user->expects($this->never())
|
||||||
->method('setQuota')
|
->method('setQuota');
|
||||||
->with('default');
|
|
||||||
|
|
||||||
$userMgr->expects($this->once())
|
$userMgr->expects($this->once())
|
||||||
->method('get')
|
->method('get')
|
||||||
|
@ -495,9 +494,8 @@ class UserTest extends \Test\TestCase {
|
||||||
->method('__get');
|
->method('__get');
|
||||||
|
|
||||||
$user = $this->createMock('\OCP\IUser');
|
$user = $this->createMock('\OCP\IUser');
|
||||||
$user->expects($this->once())
|
$user->expects($this->never())
|
||||||
->method('setQuota')
|
->method('setQuota');
|
||||||
->with('default');
|
|
||||||
|
|
||||||
$userMgr->expects($this->once())
|
$userMgr->expects($this->once())
|
||||||
->method('get')
|
->method('get')
|
||||||
|
@ -633,9 +631,8 @@ class UserTest extends \Test\TestCase {
|
||||||
->will($this->returnValue(false));
|
->will($this->returnValue(false));
|
||||||
|
|
||||||
$user = $this->createMock('\OCP\IUser');
|
$user = $this->createMock('\OCP\IUser');
|
||||||
$user->expects($this->once())
|
$user->expects($this->never())
|
||||||
->method('setQuota')
|
->method('setQuota');
|
||||||
->with('default');
|
|
||||||
|
|
||||||
$userMgr->expects($this->once())
|
$userMgr->expects($this->once())
|
||||||
->method('get')
|
->method('get')
|
||||||
|
@ -681,9 +678,8 @@ class UserTest extends \Test\TestCase {
|
||||||
->will($this->returnValue(array('23 flush')));
|
->will($this->returnValue(array('23 flush')));
|
||||||
|
|
||||||
$user = $this->createMock('\OCP\IUser');
|
$user = $this->createMock('\OCP\IUser');
|
||||||
$user->expects($this->once())
|
$user->expects($this->never())
|
||||||
->method('setQuota')
|
->method('setQuota');
|
||||||
->with('default');
|
|
||||||
|
|
||||||
$userMgr->expects($this->once())
|
$userMgr->expects($this->once())
|
||||||
->method('get')
|
->method('get')
|
||||||
|
@ -726,9 +722,8 @@ class UserTest extends \Test\TestCase {
|
||||||
->method('readAttribute');
|
->method('readAttribute');
|
||||||
|
|
||||||
$user = $this->createMock('\OCP\IUser');
|
$user = $this->createMock('\OCP\IUser');
|
||||||
$user->expects($this->once())
|
$user->expects($this->never())
|
||||||
->method('setQuota')
|
->method('setQuota');
|
||||||
->with('default');
|
|
||||||
|
|
||||||
$userMgr->expects($this->once())
|
$userMgr->expects($this->once())
|
||||||
->method('get')
|
->method('get')
|
||||||
|
|
Loading…
Reference in New Issue