Skip to content

Commit 15d1250

Browse files
authored
Merge branch 'main' into swimlanes
2 parents eb12a59 + a7f306a commit 15d1250

10 files changed

Lines changed: 28 additions & 5 deletions

File tree

l10n/fr.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ OC.L10N.register(
191191
"Admin settings" : "Paramètres d'administration",
192192
"Limit board creation to some groups" : "Limiter la création de tableaux à certains groupes",
193193
"Users outside of those groups will not be able to create their own boards, but will still be able to work on boards that have been shared with them." : "Les utilisateurs qui ne font pas partie de ces groupes ne pourront pas créer leurs propres tableaux, mais pourront toujours travailler sur les tableaux qui ont été partagés avec eux.",
194+
"Enable federation" : "Activer la fédération",
194195
"Board actions" : "Actions sur le tableau",
195196
"Scroll sideways" : "Défilement latéral",
196197
"Navigate between cards" : "Naviguer entre les cartes",

l10n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
"Admin settings" : "Paramètres d'administration",
190190
"Limit board creation to some groups" : "Limiter la création de tableaux à certains groupes",
191191
"Users outside of those groups will not be able to create their own boards, but will still be able to work on boards that have been shared with them." : "Les utilisateurs qui ne font pas partie de ces groupes ne pourront pas créer leurs propres tableaux, mais pourront toujours travailler sur les tableaux qui ont été partagés avec eux.",
192+
"Enable federation" : "Activer la fédération",
192193
"Board actions" : "Actions sur le tableau",
193194
"Scroll sideways" : "Défilement latéral",
194195
"Navigate between cards" : "Naviguer entre les cartes",

l10n/lt_LT.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ OC.L10N.register(
8888
"Cards due tomorrow" : "Rytoj baigiamos kortelės",
8989
"Upcoming cards" : "Artėjančios kortelės",
9090
"Load more" : "Įkelti daugiau",
91-
"Welcome to Nextcloud Deck!" : "Sveiki atvykę į „Nextcloud Deck“!",
91+
"Welcome to Nextcloud Deck!" : "Sveiki atvykę į „Nextcloud Darbai“!",
9292
"The card \"%s\" on \"%s\" has been assigned to you by %s." : "Kortelę \"%s\" ties \"%s\" priskyrė jums %s.",
9393
"{user} has assigned the card {deck-card} on {deck-board} to you." : "{user} priskyrė jums {deck-card} kortelę iš {deck-board}.",
9494
"The card \"%1$s\" on \"%2$s\" has reached its due date." : "Kortelės „%1$s“ galiojimo laikas baigėsi %2$s.",
@@ -324,6 +324,7 @@ OC.L10N.register(
324324
"Edit card title" : "Redaguoti kortelės pavadinimą",
325325
"Open link" : "Atverti nuorodą",
326326
"Card deleted" : "Kortelė ištrinta",
327+
"Change card color" : "Keisti kortelės spalvą",
327328
"Edit title" : "Taisyti pavadinimą",
328329
"Assign to me" : "Priskirti sau",
329330
"Unassign myself" : "Atšaukti savo priskyrimą",

l10n/lt_LT.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"Cards due tomorrow" : "Rytoj baigiamos kortelės",
8787
"Upcoming cards" : "Artėjančios kortelės",
8888
"Load more" : "Įkelti daugiau",
89-
"Welcome to Nextcloud Deck!" : "Sveiki atvykę į „Nextcloud Deck“!",
89+
"Welcome to Nextcloud Deck!" : "Sveiki atvykę į „Nextcloud Darbai“!",
9090
"The card \"%s\" on \"%s\" has been assigned to you by %s." : "Kortelę \"%s\" ties \"%s\" priskyrė jums %s.",
9191
"{user} has assigned the card {deck-card} on {deck-board} to you." : "{user} priskyrė jums {deck-card} kortelę iš {deck-board}.",
9292
"The card \"%1$s\" on \"%2$s\" has reached its due date." : "Kortelės „%1$s“ galiojimo laikas baigėsi %2$s.",
@@ -322,6 +322,7 @@
322322
"Edit card title" : "Redaguoti kortelės pavadinimą",
323323
"Open link" : "Atverti nuorodą",
324324
"Card deleted" : "Kortelė ištrinta",
325+
"Change card color" : "Keisti kortelės spalvą",
325326
"Edit title" : "Taisyti pavadinimą",
326327
"Assign to me" : "Priskirti sau",
327328
"Unassign myself" : "Atšaukti savo priskyrimą",

l10n/sv.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ OC.L10N.register(
324324
"Edit card title" : "Ändra korttitel",
325325
"Open link" : "Öppna länken",
326326
"Card deleted" : "Kortet har raderats",
327+
"Change card color" : "Ändra kortfärg",
327328
"Edit title" : "Redigera titel",
328329
"Assign to me" : "Tilldela till mig",
329330
"Unassign myself" : "Ta bort från mig själv",

l10n/sv.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@
322322
"Edit card title" : "Ändra korttitel",
323323
"Open link" : "Öppna länken",
324324
"Card deleted" : "Kortet har raderats",
325+
"Change card color" : "Ändra kortfärg",
325326
"Edit title" : "Redigera titel",
326327
"Assign to me" : "Tilldela till mig",
327328
"Unassign myself" : "Ta bort från mig själv",

l10n/zh_TW.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ OC.L10N.register(
324324
"Edit card title" : "編輯卡片標題",
325325
"Open link" : "開啟連結",
326326
"Card deleted" : "卡片已刪除",
327+
"Change card color" : "變更卡片顏色",
327328
"Edit title" : "編輯標題",
328329
"Assign to me" : "分配給我",
329330
"Unassign myself" : "取消分配給我",

l10n/zh_TW.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@
322322
"Edit card title" : "編輯卡片標題",
323323
"Open link" : "開啟連結",
324324
"Card deleted" : "卡片已刪除",
325+
"Change card color" : "變更卡片顏色",
325326
"Edit title" : "編輯標題",
326327
"Assign to me" : "分配給我",
327328
"Unassign myself" : "取消分配給我",

lib/Service/CirclesService.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use OCA\Circles\Model\Circle;
1515
use OCA\Circles\Model\Member;
1616
use OCA\Circles\Model\Probes\CircleProbe;
17+
use OCA\Circles\Model\Probes\DataProbe;
1718
use OCP\App\IAppManager;
1819
use OCP\Server;
1920
use Throwable;
@@ -45,7 +46,9 @@ public function getCircle(string $circleId): ?Circle {
4546
// Enforce current user condition since we always want the full list of members
4647
$circlesManager = Server::get(CirclesManager::class);
4748
$circlesManager->startSuperSession();
48-
return $circlesManager->getCircle($circleId);
49+
$dataProbe = new DataProbe();
50+
$dataProbe->add(DataProbe::OWNER);
51+
return $circlesManager->probeCircle($circleId, null, $dataProbe);
4952
} catch (Throwable $e) {
5053
}
5154
return null;
@@ -64,7 +67,9 @@ public function isUserInCircle(string $circleId, string $userId): bool {
6467
$circlesManager = Server::get(CirclesManager::class);
6568
$federatedUser = $circlesManager->getFederatedUser($userId, Member::TYPE_USER);
6669
$circlesManager->startSession($federatedUser);
67-
$circle = $circlesManager->getCircle($circleId);
70+
$dataProbe = new DataProbe();
71+
$dataProbe->add(DataProbe::INITIATOR);
72+
$circle = $circlesManager->probeCircle($circleId, null, $dataProbe);
6873
$member = $circle->getInitiator();
6974
$isUserInCircle = $member->getLevel() >= Member::LEVEL_MEMBER;
7075

@@ -96,7 +101,7 @@ public function getUserCircles(string $userId): array {
96101
$probe->mustBeMember();
97102
return array_map(function (Circle $circle) {
98103
return $circle->getSingleId();
99-
}, $circlesManager->getCircles($probe));
104+
}, $circlesManager->probeCircles($probe));
100105
} catch (Throwable $e) {
101106
}
102107
return [];

tests/stub.phpstub

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,27 @@ namespace OCA\Circles\Model\Probes {
9999
public function __construct() {}
100100
public function mustBeMember(bool $must = true): self {}
101101
}
102+
class DataProbe {
103+
public const OWNER = 'd';
104+
public const INITIATOR = 'h';
105+
public function __construct() {}
106+
public function add(string $key, array $path = []): self {}
107+
public function mustBeMember(bool $must = true): self {}
108+
}
102109
}
103110

104111
namespace OCA\Circles {
105112
use OCA\Circles\Model\Circle;
106113
use OCA\Circles\Model\FederatedUser;
107114
use OCA\Circles\Model\Probes\CircleProbe;
115+
use OCA\Circles\Model\Probes\DataProbe;
108116
class CirclesManager {
109117
public function startSuperSession(): void {}
110118
public function startSession(?FederatedUser $federatedUser = null): void {}
111119
public function getCircles(?CircleProbe $probe = null): array {}
112120
public function getCircle(string $singleId, ?CircleProbe $probe = null): Circle {}
121+
public function probeCircles(?CircleProbe $circleProbe = null, ?DataProbe $dataProbe = null): array {}
122+
public function probeCircle(string $singleId, ?CircleProbe $probe = null, ?DataProbe $dataProbe = null): Circle {}
113123
public function getFederatedUser(string $federatedId, int $type = Member::TYPE_SINGLE): FederatedUser {}
114124
}
115125
}

0 commit comments

Comments
 (0)