diff options
author | provokateurin <kate@provokateurin.de> | 2024-07-25 13:24:59 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-07-26 07:30:45 +0200 |
commit | c57c3c15734c153d541247cc5fca198cb0e4f7b6 (patch) | |
tree | 2cccda08d45230601f8bb5f1e74b74195d826692 /core/Controller/UnifiedSearchController.php | |
parent | 41f7fa6840a13cb2cb1c9d4ac1d3eca6012e22de (diff) | |
download | nextcloud-server-c57c3c15734c153d541247cc5fca198cb0e4f7b6.tar.gz nextcloud-server-c57c3c15734c153d541247cc5fca198cb0e4f7b6.zip |
refactor(core): Replace security annotations with respective attributes
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'core/Controller/UnifiedSearchController.php')
-rw-r--r-- | core/Controller/UnifiedSearchController.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index 236ca845da6..20d6fb5e59c 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -15,6 +15,8 @@ use OC\Search\SearchQuery; use OC\Search\UnsupportedFilter; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\ApiRoute; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\NoCSRFRequired; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IRequest; @@ -40,9 +42,6 @@ class UnifiedSearchController extends OCSController { } /** - * @NoAdminRequired - * @NoCSRFRequired - * * Get the providers for unified search * * @param string $from the url the user is currently at @@ -50,6 +49,8 @@ class UnifiedSearchController extends OCSController { * * 200: Providers returned */ + #[NoAdminRequired] + #[NoCSRFRequired] #[ApiRoute(verb: 'GET', url: '/providers', root: '/search')] public function getProviders(string $from = ''): DataResponse { [$route, $parameters] = $this->getRouteInformation($from); @@ -61,9 +62,6 @@ class UnifiedSearchController extends OCSController { } /** - * @NoAdminRequired - * @NoCSRFRequired - * * Launch a search for a specific search provider. * * Additional filters are available for each provider. @@ -81,6 +79,8 @@ class UnifiedSearchController extends OCSController { * 200: Search entries returned * 400: Searching is not possible */ + #[NoAdminRequired] + #[NoCSRFRequired] #[ApiRoute(verb: 'GET', url: '/providers/{providerId}/search', root: '/search')] public function search( string $providerId, |