diff options
author | provokateurin <kate@provokateurin.de> | 2024-07-25 13:14:46 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-08-14 09:44:57 +0200 |
commit | c102b89cd5037b21504292ed0c9ed826b631bd55 (patch) | |
tree | 8924a3c26a66889cfdc62207ccbcae08232d011d /apps/files_external/lib/Controller/ApiController.php | |
parent | 1f1cb6da4843e2d16bf0e1cb48821a0d7d70a84e (diff) | |
download | nextcloud-server-c102b89cd5037b21504292ed0c9ed826b631bd55.tar.gz nextcloud-server-c102b89cd5037b21504292ed0c9ed826b631bd55.zip |
refactor(files_external): Replace security annotations with respective attributes
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/files_external/lib/Controller/ApiController.php')
-rw-r--r-- | apps/files_external/lib/Controller/ApiController.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_external/lib/Controller/ApiController.php b/apps/files_external/lib/Controller/ApiController.php index a763f7874c3..56242938593 100644 --- a/apps/files_external/lib/Controller/ApiController.php +++ b/apps/files_external/lib/Controller/ApiController.php @@ -14,6 +14,7 @@ use OCA\Files_External\ResponseDefinitions; use OCA\Files_External\Service\UserGlobalStoragesService; use OCA\Files_External\Service\UserStoragesService; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; @@ -76,14 +77,13 @@ class ApiController extends OCSController { } /** - * @NoAdminRequired - * * Get the mount points visible for this user * * @return DataResponse<Http::STATUS_OK, Files_ExternalMount[], array{}> * * 200: User mounts returned */ + #[NoAdminRequired] public function getUserMounts(): DataResponse { $entries = []; $mountPoints = []; @@ -105,12 +105,10 @@ class ApiController extends OCSController { } /** - * @NoAdminRequired - * @NoCSRFRequired - * * Ask for credentials using a browser's native basic auth prompt * Then returns it if provided */ + #[NoAdminRequired] #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] public function askNativeAuth(): DataResponse { if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { |