diff options
author | Joas Schilling <coding@schilljs.com> | 2023-04-24 16:17:11 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-04-25 12:12:19 +0200 |
commit | f39a4299ab8334247b50f0cd42c7e24fe4e184f7 (patch) | |
tree | 52252411a28895247c07f9b9b5289679f0f9897c /lib/Controller/RecordingController.php | |
parent | b2b0bdfba9635ffea0e46b689f5a6f417ae23172 (diff) |
techdebt(controllers): Migrate Talk annotations to attributes
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/RecordingController.php')
-rw-r--r-- | lib/Controller/RecordingController.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php index f4ab1a6b3..612410204 100644 --- a/lib/Controller/RecordingController.php +++ b/lib/Controller/RecordingController.php @@ -31,6 +31,9 @@ use OCA\Talk\Config; use OCA\Talk\Exceptions\ParticipantNotFoundException; use OCA\Talk\Exceptions\RoomNotFoundException; use OCA\Talk\Manager; +use OCA\Talk\Middleware\Attribute\RequireLoggedInModeratorParticipant; +use OCA\Talk\Middleware\Attribute\RequireModeratorParticipant; +use OCA\Talk\Middleware\Attribute\RequireRoom; use OCA\Talk\Room; use OCA\Talk\Service\ParticipantService; use OCA\Talk\Service\RecordingService; @@ -266,8 +269,8 @@ class RecordingController extends AEnvironmentAwareController { /** * @NoAdminRequired - * @RequireLoggedInModeratorParticipant */ + #[RequireLoggedInModeratorParticipant] public function start(int $status): DataResponse { try { $this->recordingService->start($this->room, $status, $this->userId, $this->participant); @@ -279,8 +282,8 @@ class RecordingController extends AEnvironmentAwareController { /** * @NoAdminRequired - * @RequireLoggedInModeratorParticipant */ + #[RequireLoggedInModeratorParticipant] public function stop(): DataResponse { try { $this->recordingService->stop($this->room, $this->participant); @@ -292,9 +295,9 @@ class RecordingController extends AEnvironmentAwareController { /** * @PublicPage - * @RequireRoom */ #[BruteForceProtection(action: 'talkRecordingSecret')] + #[RequireRoom] public function store(string $owner): DataResponse { $data = $this->room->getToken(); if (!$this->validateBackendRequest($data)) { @@ -320,8 +323,8 @@ class RecordingController extends AEnvironmentAwareController { /** * @NoAdminRequired - * @RequireModeratorParticipant */ + #[RequireModeratorParticipant] public function notificationDismiss(int $timestamp): DataResponse { try { $this->recordingService->notificationDismiss( @@ -337,8 +340,8 @@ class RecordingController extends AEnvironmentAwareController { /** * @NoAdminRequired - * @RequireModeratorParticipant */ + #[RequireModeratorParticipant] public function shareToChat(int $fileId, int $timestamp): DataResponse { try { $this->recordingService->shareToChat( |