summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/HookManager.php15
-rw-r--r--apps/dav/tests/unit/DAV/HookManagerTest.php41
-rw-r--r--apps/files/css/files.scss34
-rw-r--r--apps/files_sharing/lib/External/Scanner.php2
4 files changed, 62 insertions, 30 deletions
diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php
index 558aad72c03..1cb6e604524 100644
--- a/apps/dav/lib/HookManager.php
+++ b/apps/dav/lib/HookManager.php
@@ -59,6 +59,9 @@ class HookManager {
private $calendarsToDelete = [];
/** @var array */
+ private $subscriptionsToDelete = [];
+
+ /** @var array */
private $addressBooksToDelete = [];
/** @var EventDispatcherInterface */
@@ -112,9 +115,11 @@ class HookManager {
public function preDeleteUser($params) {
$uid = $params['uid'];
+ $userPrincipalUri = 'principals/users/' . $uid;
$this->usersToDelete[$uid] = $this->userManager->get($uid);
- $this->calendarsToDelete = $this->calDav->getUsersOwnCalendars('principals/users/' . $uid);
- $this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks('principals/users/' . $uid);
+ $this->calendarsToDelete = $this->calDav->getUsersOwnCalendars($userPrincipalUri);
+ $this->subscriptionsToDelete = $this->calDav->getSubscriptionsForUser($userPrincipalUri);
+ $this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks($userPrincipalUri);
}
public function preUnassignedUserId($uid) {
@@ -130,6 +135,12 @@ class HookManager {
foreach ($this->calendarsToDelete as $calendar) {
$this->calDav->deleteCalendar($calendar['id']);
}
+
+ foreach ($this->subscriptionsToDelete as $subscription) {
+ $this->calDav->deleteSubscription(
+ $subscription['id'],
+ );
+ }
$this->calDav->deleteAllSharesByUser('principals/users/' . $uid);
foreach ($this->addressBooksToDelete as $addressBook) {
diff --git a/apps/dav/tests/unit/DAV/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php
index 8b8fad4d7cf..481f129ae90 100644
--- a/apps/dav/tests/unit/DAV/HookManagerTest.php
+++ b/apps/dav/tests/unit/DAV/HookManagerTest.php
@@ -38,6 +38,7 @@ use OCA\DAV\HookManager;
use OCP\IL10N;
use OCP\IUser;
use OCP\IUserManager;
+use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Test\TestCase;
@@ -45,7 +46,7 @@ class HookManagerTest extends TestCase {
/** @var IL10N */
private $l10n;
- /** @var EventDispatcherInterface | \PHPUnit\Framework\MockObject\MockObject */
+ /** @var EventDispatcherInterface | MockObject */
private $eventDispatcher;
protected function setUp(): void {
@@ -66,17 +67,17 @@ class HookManagerTest extends TestCase {
->getMock();
$user->expects($this->once())->method('getUID')->willReturn('newUser');
- /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
+ /** @var IUserManager | MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
+ /** @var SyncService | MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
- /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
+ /** @var CalDavBackend | MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
@@ -85,7 +86,7 @@ class HookManagerTest extends TestCase {
'principals/users/newUser',
'personal', ['{DAV:}displayname' => 'Personal']);
- /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
+ /** @var CardDavBackend | MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
@@ -104,24 +105,24 @@ class HookManagerTest extends TestCase {
->getMock();
$user->expects($this->once())->method('getUID')->willReturn('newUser');
- /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
+ /** @var IUserManager | MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
+ /** @var SyncService | MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
- /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
+ /** @var CalDavBackend | MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
$cal->expects($this->once())->method('getCalendarsForUserCount')->willReturn(1);
$cal->expects($this->never())->method('createCalendar');
- /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
+ /** @var CardDavBackend | MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
@@ -138,17 +139,17 @@ class HookManagerTest extends TestCase {
->getMock();
$user->expects($this->once())->method('getUID')->willReturn('newUser');
- /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
+ /** @var IUserManager | MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
+ /** @var SyncService | MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
- /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
+ /** @var CalDavBackend | MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
@@ -157,7 +158,7 @@ class HookManagerTest extends TestCase {
'principals/users/newUser',
'personal', ['{DAV:}displayname' => 'Personal']);
- /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
+ /** @var CardDavBackend | MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
@@ -175,30 +176,34 @@ class HookManagerTest extends TestCase {
->disableOriginalConstructor()
->getMock();
- /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
+ /** @var IUserManager | MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
$userManager->expects($this->once())->method('get')->willReturn($user);
- /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
+ /** @var SyncService | MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
$syncService->expects($this->once())
->method('deleteUser');
- /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
+ /** @var CalDavBackend | MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
$cal->expects($this->once())->method('getUsersOwnCalendars')->willReturn([
['id' => 'personal']
]);
- $cal->expects($this->once())->method('deleteCalendar');
+ $cal->expects($this->once())->method('getSubscriptionsForUser')->willReturn([
+ ['id' => 'some-subscription']
+ ]);
+ $cal->expects($this->once())->method('deleteCalendar')->with('personal');
+ $cal->expects($this->once())->method('deleteSubscription')->with('some-subscription');
$cal->expects($this->once())->method('deleteAllSharesByUser');
- /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
+ /** @var CardDavBackend | MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss
index af794264083..32f8af6327a 100644
--- a/apps/files/css/files.scss
+++ b/apps/files/css/files.scss
@@ -420,11 +420,6 @@ table {
padding: 0 20px 0 0;
}
}
-
- .uploadtext {
- position: absolute;
- left: 55px;
- }
}
.hide-hidden-files #filestable #fileList tr.hidden-file,
@@ -452,13 +447,22 @@ table td.filename .nametext .innernametext {
/* for smaller resolutions - see mobile.css */
table td.filename .uploadtext {
+ position: absolute;
font-weight: normal;
- margin-left: 55px;
- margin-top: 5px;
+ // checkbox width
+ margin-left: 50px;
+ left: 0;
+ bottom: 0;
height: 20px;
- padding: 10px 0;
+ padding: 0 4px;
+ // align with file name
+ padding-left: 1px;
font-size: 11px;
- opacity: .5;
+ // double the font size
+ line-height: 22px;
+ color: var(--color-text-maxcontrast);
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
table td.selection {
@@ -975,6 +979,18 @@ table.dragshadow td.size {
}
}
+ .uploadtext {
+ width: 100%;
+ margin: 0;
+ top: 0;
+ bottom: auto;
+ // checkbox align
+ height: 28px;
+ padding-top: 4px;
+ // checkbox margins
+ padding-left: calc(44px - 16px);
+ }
+
.name {
height: 100%;
border-radius: var(--border-radius);
diff --git a/apps/files_sharing/lib/External/Scanner.php b/apps/files_sharing/lib/External/Scanner.php
index 71187707ad7..483f1041c01 100644
--- a/apps/files_sharing/lib/External/Scanner.php
+++ b/apps/files_sharing/lib/External/Scanner.php
@@ -39,7 +39,7 @@ class Scanner extends \OC\Files\Cache\Scanner {
/** {@inheritDoc} */
public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) {
if (!$this->storage->remoteIsOwnCloud()) {
- return parent::scan($path, $recursive, $recursive, $lock);
+ return parent::scan($path, $recursive, $reuse, $lock);
}
$this->scanAll();