|
|
@@ -254,7 +254,7 @@ class ApiController implements LoggerAwareInterface
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * -- Target of the route 'site_set_domain' --
|
|
|
+ * -- Target of the route 'site_setdomain' --
|
|
|
* >> Requires a query param named 'organization-id' (int)
|
|
|
*
|
|
|
* Set a new domain for the organization website
|
|
|
@@ -287,6 +287,34 @@ class ApiController implements LoggerAwareInterface
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * -- Target of the route 'site_resetperms' --
|
|
|
+ * >> Requires a query param named 'organization-id' (int)
|
|
|
+ *
|
|
|
+ * Reset the permissions of the website be users (admin, editors...)
|
|
|
+ *
|
|
|
+ * @param ServerRequest $request
|
|
|
+ * @return JsonResponse
|
|
|
+ * @throws \Exception
|
|
|
+ */
|
|
|
+ public function resetBeUserPermsAction(ServerRequest $request) {
|
|
|
+ $this->assertIpAllowed();
|
|
|
+
|
|
|
+ $organizationId = $this->getOrganizationId($request);
|
|
|
+
|
|
|
+ $controller = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class);
|
|
|
+ $rootUid = $controller->resetBeUserPermsAction($organizationId);
|
|
|
+
|
|
|
+ return new JsonResponse(
|
|
|
+ [
|
|
|
+ 'organization_id' => $organizationId,
|
|
|
+ 'msg' => "The website with root uid " . $rootUid . " had its be users permissions reset",
|
|
|
+ 'root_uid' => $rootUid
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* -- Target of the route 'site_status' --
|
|
|
* >> Requires a query param named 'organization-id' (int)
|