@@ -45,17 +45,14 @@ public function __construct($appName,
4545 /**
4646 * Gets all versions of a note.
4747 *
48- * @NoAdminRequired
49- *
50- * @NoCSRFRequired
51- *
52- * @CORS
53- *
5448 * @return array
5549 *
5650 * @throws \OCP\Lock\LockedException
5751 * @throws \OC\User\NoUserException
5852 */
53+ #[NoAdminRequired]
54+ #[NoCSRFRequired]
55+ #[CORS ]
5956 public function getAllVersions () {
6057 $ source = $ this ->request ->getParam ('file_name ' , '' );
6158 $ errorMessages = [];
@@ -148,16 +145,13 @@ protected static function getUidAndFilename($filename) {
148145 /**
149146 * Returns information about the ownCloud server.
150147 *
151- * @NoAdminRequired
152- *
153- * @NoCSRFRequired
154- *
155- * @CORS
156- *
157148 * @return string|array
158149 *
159150 * @throws Exception
160151 */
152+ #[NoAdminRequired]
153+ #[NoCSRFRequired]
154+ #[CORS ]
161155 public function getAppInfo () {
162156 $ appManager = \OC ::$ server ->getAppManager ();
163157 $ versionsAppEnabled = $ appManager ->isEnabledForUser ('files_versions ' );
@@ -186,16 +180,13 @@ public function getAppInfo() {
186180 /**
187181 * Gets information about trashed notes.
188182 *
189- * @NoAdminRequired
190- *
191- * @NoCSRFRequired
192- *
193- * @CORS
194- *
195183 * @return string|array
196184 *
197185 * @throws \OCP\Lock\LockedException
198186 */
187+ #[NoAdminRequired]
188+ #[NoCSRFRequired]
189+ #[CORS ]
199190 public function getTrashedNotes () {
200191 $ dir = $ this ->request ->getParam ('dir ' , '' );
201192 $ customFileExtensions = $ this ->request ->getParam ('extensions ' , []);
@@ -284,13 +275,10 @@ public function getTrashedNotes() {
284275 * @throws \OCP\Files\NotPermittedException
285276 *
286277 * @see owncloud/core/apps/files_trashbin/ajax/undelete.php
287- *
288- * @NoAdminRequired
289- *
290- * @NoCSRFRequired
291- *
292- * @CORS
293278 */
279+ #[NoAdminRequired]
280+ #[NoCSRFRequired]
281+ #[CORS ]
294282 public function restoreTrashedNote () {
295283 $ filename = $ this ->request ->getParam ('file_name ' );
296284 $ timestamp = (int ) $ this ->request ->getParam ('timestamp ' );
0 commit comments