Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit 46cd7d1

Browse files
committed
refactor: OrganisationController::activate — restore if/else expressiveness
The previous diff replaced the original `if (PROVISIONING) { … } else { … }` with two independent `if` statements branching on the same $status read. Behaviour is equivalent today (the two conditions are mutually exclusive), but a future refactor that mutates `$status` between the branches would silently double-run, and a reader can't tell at a glance that exactly one branch fires. Fold the second `if` back into the `else`. Refs: #1419 review (minor) — discussion_r3187494527
1 parent 7196784 commit 46cd7d1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/Controller/OrganisationController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,9 +1169,7 @@ public function activate(string $uuid): JSONResponse
11691169
if ($status === TenantLifecycleService::STATUS_PROVISIONING) {
11701170
$userId = \OC::$server->get(\OCP\IUserSession::class)->getUser()?->getUID() ?? 'admin';
11711171
$result = $this->tenantLifecycleService->provision($organisation, $userId);
1172-
}
1173-
1174-
if ($status !== TenantLifecycleService::STATUS_PROVISIONING) {
1172+
} else {
11751173
$result = $this->tenantLifecycleService->reactivate($organisation);
11761174
}
11771175

0 commit comments

Comments
 (0)