diff options
Diffstat (limited to 'apps/updatenotification/lib/Controller/ChangelogController.php')
-rw-r--r-- | apps/updatenotification/lib/Controller/ChangelogController.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/updatenotification/lib/Controller/ChangelogController.php b/apps/updatenotification/lib/Controller/ChangelogController.php index b3ce77b11d9..a274ed3d2b2 100644 --- a/apps/updatenotification/lib/Controller/ChangelogController.php +++ b/apps/updatenotification/lib/Controller/ChangelogController.php @@ -11,10 +11,13 @@ namespace OCA\UpdateNotification\Controller; use OCA\UpdateNotification\Manager; use OCP\App\IAppManager; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\NoCSRFRequired; use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IRequest; +use OCP\Util; #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] class ChangelogController extends Controller { @@ -33,9 +36,9 @@ class ChangelogController extends Controller { * This page is only used for clients not support showing the app changelog feature in-app and thus need to show it on a dedicated page. * @param string $app App to show the changelog for * @param string|null $version Version entry to show (defaults to latest installed) - * @NoCSRFRequired - * @NoAdminRequired */ + #[NoAdminRequired] + #[NoCSRFRequired] public function showChangelog(string $app, ?string $version = null): TemplateResponse { $version = $version ?? $this->appManager->getAppVersion($app); $appInfo = $this->appManager->getAppInfo($app) ?? []; @@ -53,7 +56,7 @@ class ChangelogController extends Controller { 'text' => $changes, ]); - \OCP\Util::addScript($this->appName, 'view-changelog-page'); + Util::addScript($this->appName, 'view-changelog-page'); return new TemplateResponse($this->appName, 'empty'); } } |