aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/AutoCompleteController.php
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-07-25 13:24:59 +0200
committerprovokateurin <kate@provokateurin.de>2024-07-26 07:30:45 +0200
commitc57c3c15734c153d541247cc5fca198cb0e4f7b6 (patch)
tree2cccda08d45230601f8bb5f1e74b74195d826692 /core/Controller/AutoCompleteController.php
parent41f7fa6840a13cb2cb1c9d4ac1d3eca6012e22de (diff)
downloadnextcloud-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/AutoCompleteController.php')
-rw-r--r--core/Controller/AutoCompleteController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Controller/AutoCompleteController.php b/core/Controller/AutoCompleteController.php
index 02d525e1f7a..6a5071aed16 100644
--- a/core/Controller/AutoCompleteController.php
+++ b/core/Controller/AutoCompleteController.php
@@ -11,6 +11,7 @@ namespace OC\Core\Controller;
use OC\Core\ResponseDefinitions;
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\Collaboration\AutoComplete\AutoCompleteEvent;
@@ -36,8 +37,6 @@ class AutoCompleteController extends OCSController {
}
/**
- * @NoAdminRequired
- *
* Autocomplete a query
*
* @param string $search Text to search for
@@ -51,6 +50,7 @@ class AutoCompleteController extends OCSController {
*
* 200: Autocomplete results returned
*/
+ #[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/autocomplete/get', root: '/core')]
public function get(string $search, ?string $itemType, ?string $itemId, ?string $sorter = null, array $shareTypes = [IShare::TYPE_USER], int $limit = 10): DataResponse {
// if enumeration/user listings are disabled, we'll receive an empty