aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/Controller/HeartbeatController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_status/lib/Controller/HeartbeatController.php')
-rw-r--r--apps/user_status/lib/Controller/HeartbeatController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_status/lib/Controller/HeartbeatController.php b/apps/user_status/lib/Controller/HeartbeatController.php
index e8325617557..65fdda75eec 100644
--- a/apps/user_status/lib/Controller/HeartbeatController.php
+++ b/apps/user_status/lib/Controller/HeartbeatController.php
@@ -13,6 +13,7 @@ use OCA\UserStatus\ResponseDefinitions;
use OCA\UserStatus\Service\StatusService;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\ApiRoute;
+use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\AppFramework\Utility\ITimeFactory;
@@ -55,8 +56,6 @@ class HeartbeatController extends OCSController {
/**
* Keep the status alive
*
- * @NoAdminRequired
- *
* @param string $status Only online, away
*
* @return DataResponse<Http::STATUS_OK, UserStatusPrivate, array{}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NO_CONTENT, array<empty>, array{}>
@@ -64,6 +63,7 @@ class HeartbeatController extends OCSController {
* 204: User has no status to keep alive
* 400: Invalid status to update
*/
+ #[NoAdminRequired]
#[ApiRoute(verb: 'PUT', url: '/api/v1/heartbeat')]
public function heartbeat(string $status): DataResponse {
if (!\in_array($status, [IUserStatus::ONLINE, IUserStatus::AWAY], true)) {