aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/WhatsNewController.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/WhatsNewController.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/WhatsNewController.php')
-rw-r--r--core/Controller/WhatsNewController.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/Controller/WhatsNewController.php b/core/Controller/WhatsNewController.php
index 1218e2d1f68..06b27b0d302 100644
--- a/core/Controller/WhatsNewController.php
+++ b/core/Controller/WhatsNewController.php
@@ -11,6 +11,7 @@ use OC\Updater\ChangesCheck;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\ApiRoute;
+use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\Defaults;
use OCP\IConfig;
@@ -36,8 +37,6 @@ class WhatsNewController extends OCSController {
}
/**
- * @NoAdminRequired
- *
* Get the changes
*
* @return DataResponse<Http::STATUS_OK, array{changelogURL: string, product: string, version: string, whatsNew?: array{regular: string[], admin: string[]}}, array{}>|DataResponse<Http::STATUS_NO_CONTENT, array<empty>, array{}>
@@ -45,6 +44,7 @@ class WhatsNewController extends OCSController {
* 200: Changes returned
* 204: No changes
*/
+ #[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/whatsnew', root: '/core')]
public function get():DataResponse {
$user = $this->userSession->getUser();
@@ -81,8 +81,6 @@ class WhatsNewController extends OCSController {
}
/**
- * @NoAdminRequired
- *
* Dismiss the changes
*
* @param string $version Version to dismiss the changes for
@@ -93,6 +91,7 @@ class WhatsNewController extends OCSController {
*
* 200: Changes dismissed
*/
+ #[NoAdminRequired]
#[ApiRoute(verb: 'POST', url: '/whatsnew', root: '/core')]
public function dismiss(string $version):DataResponse {
$user = $this->userSession->getUser();