You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Command/Delete.php
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
31
31
return -1;
32
32
}
33
33
34
+
if ($folder->isTeamSpace()) {
35
+
$output->writeln('<error>This folder belongs to a team and cannot be deleted directly; unlink it from its team first.</error>');
36
+
return1;
37
+
}
38
+
34
39
/** @var QuestionHelper $helper */
35
40
$helper = $this->getHelper('question');
36
41
$question = newConfirmationQuestion('Are you sure you want to delete the Team folder ' . $folder->mountPoint . ' and all files within, this cannot be undone (y/N).', false);
// The owning team's access cannot be removed independently; the folder
386
+
// must be unlinked from its team first.
387
+
if ($folder->isTeamSpace() && $folder->teamCircleId === $group) {
388
+
thrownewOCSForbiddenException('This folder belongs to this team and its access cannot be removed independently; unlink the folder from the team first');
// The owning team's permissions on a team space are fixed.
417
+
if ($folder->isTeamSpace() && $folder->teamCircleId === $group) {
418
+
thrownewOCSForbiddenException('This team space belongs to this team and its permissions cannot be changed independently; unlink the team space from the team first');
thrownewOCSForbiddenException('This folder belongs to a team and its advanced permissions cannot be changed independently; unlink it from its team first');
501
+
}
473
502
474
503
$this->manager->setFolderACL($id, $acl);
475
504
@@ -496,10 +525,12 @@ public function setACL(int $id, bool $acl): DataResponse {
0 commit comments