Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(files_versions): Replace security annotations with respective attributes #46813

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions apps/files_versions/lib/Controller/PreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use OCA\Files_Versions\Versions\IVersionManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\Files\IRootFolder;
Expand Down Expand Up @@ -47,9 +49,6 @@ public function __construct(
}

/**
* @NoAdminRequired
* @NoCSRFRequired
*
* Get the preview for a file version
*
* @param string $file Path of the file
Expand All @@ -62,6 +61,8 @@ public function __construct(
* 400: Getting preview is not possible
* 404: Preview not found
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function getPreview(
string $file = '',
int $x = 44,
Expand Down
Loading