diff options
author | Joas Schilling <coding@schilljs.com> | 2023-04-25 15:37:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-04-26 09:15:49 +0200 |
commit | 5ac5d00e2d64f580aadc3257d166c1df4c904313 (patch) | |
tree | 17c2d32d1ab87501fed7c356dcd82c02d21fec83 /lib/Controller/MatterbridgeController.php | |
parent | a699d959ec4c6749172ee70d419f0ed90efc80f5 (diff) |
feat(controllers): Migrate server annotations to attributes
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/MatterbridgeController.php')
-rw-r--r-- | lib/Controller/MatterbridgeController.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Controller/MatterbridgeController.php b/lib/Controller/MatterbridgeController.php index c7ecb4f97..8657581e8 100644 --- a/lib/Controller/MatterbridgeController.php +++ b/lib/Controller/MatterbridgeController.php @@ -30,6 +30,7 @@ use OCA\Talk\Manager; use OCA\Talk\MatterbridgeManager; use OCA\Talk\Middleware\Attribute\RequireLoggedInModeratorParticipant; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; @@ -53,9 +54,8 @@ class MatterbridgeController extends AEnvironmentAwareController { /** * Get bridge information of one room - * - * @NoAdminRequired */ + #[NoAdminRequired] #[RequireLoggedInModeratorParticipant] public function getBridgeOfRoom(): DataResponse { $pid = $this->bridgeManager->checkBridge($this->room); @@ -68,9 +68,8 @@ class MatterbridgeController extends AEnvironmentAwareController { /** * Get bridge process information - * - * @NoAdminRequired */ + #[NoAdminRequired] #[RequireLoggedInModeratorParticipant] public function getBridgeProcessState(): DataResponse { $state = $this->bridgeManager->getBridgeProcessState($this->room); @@ -79,9 +78,8 @@ class MatterbridgeController extends AEnvironmentAwareController { /** * Edit bridge information of one room - * - * @NoAdminRequired */ + #[NoAdminRequired] #[RequireLoggedInModeratorParticipant] public function editBridgeOfRoom(bool $enabled, array $parts = []): DataResponse { try { @@ -94,9 +92,8 @@ class MatterbridgeController extends AEnvironmentAwareController { /** * Delete bridge of one room - * - * @NoAdminRequired */ + #[NoAdminRequired] #[RequireLoggedInModeratorParticipant] public function deleteBridgeOfRoom(): DataResponse { try { |