Skip to content

Commit

Permalink
Merge pull request #47084 from nextcloud/backport/47070/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(share): Rename Circle to Team
  • Loading branch information
AndyScherzinger authored Aug 6, 2024
2 parents 3cd47a4 + cdf29e6 commit 14e0e48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ protected function formatShare(IShare $share, ?Node $recipientNode = null): arra
$result['token'] = $share->getToken();
} elseif ($share->getShareType() === IShare::TYPE_CIRCLE) {
// getSharedWith() returns either "name (type, owner)" or
// "name (type, owner) [id]", depending on the Circles app version.
// "name (type, owner) [id]", depending on the Teams app version.
$hasCircleId = (substr($share->getSharedWith(), -1) === ']');

$result['share_with_displayname'] = $share->getSharedWithDisplayName();
Expand Down Expand Up @@ -762,14 +762,14 @@ public function createShare(
$share->setPermissions($permissions);
} elseif ($shareType === IShare::TYPE_CIRCLE) {
if (!\OC::$server->getAppManager()->isEnabledForUser('circles') || !class_exists('\OCA\Circles\ShareByCircleProvider')) {
throw new OCSNotFoundException($this->l->t('You cannot share to a Circle if the app is not enabled'));
throw new OCSNotFoundException($this->l->t('You cannot share to a Team if the app is not enabled'));
}

$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($shareWith);

// Valid circle is required to share
// Valid team is required to share
if ($circle === null) {
throw new OCSNotFoundException($this->l->t('Please specify a valid circle'));
throw new OCSNotFoundException($this->l->t('Please specify a valid team'));
}
$share->setSharedWith($shareWith);
$share->setPermissions($permissions);
Expand Down Expand Up @@ -1964,7 +1964,7 @@ private function getAllShares(?Node $path = null, bool $reshares = false) {
// EMAIL SHARES
$mailShares = $this->shareManager->getSharesBy($this->currentUser, IShare::TYPE_EMAIL, $path, $reshares, -1, 0);

// CIRCLE SHARES
// TEAM SHARES
$circleShares = $this->shareManager->getSharesBy($this->currentUser, IShare::TYPE_CIRCLE, $path, $reshares, -1, 0);

// TALK SHARES
Expand Down

0 comments on commit 14e0e48

Please sign in to comment.