Skip to content

Commit d81ec0f

Browse files
fix(php): Replace security annotations with respective attributes
Signed-off-by: Misha M.-Kupriyanov <[email protected]>
1 parent 2e78ad8 commit d81ec0f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/Controller/JavaScriptController.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use OCA\NCGoogleAnalytics\Config;
1111
use OCA\NCGoogleAnalytics\Service\Consent\IConsentService;
1212
use OCP\AppFramework\Controller;
13+
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
14+
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
15+
use OCP\AppFramework\Http\Attribute\PublicPage;
1316
use OCP\AppFramework\Http\DataDownloadResponse;
1417
use OCP\AppFramework\Http\TextPlainResponse;
1518
use OCP\IRequest;
@@ -33,12 +36,11 @@ public function __construct(
3336
}
3437

3538
/**
36-
* @NoAdminRequired
37-
* @NoCSRFRequired
38-
* @PublicPage
39-
*
4039
* @return TextPlainResponse|DataDownloadResponse
4140
*/
41+
#[NoAdminRequired]
42+
#[NoCSRFRequired]
43+
#[PublicPage]
4244
public function tracking(): TextPlainResponse|DataDownloadResponse {
4345
$gtmId = $this->config->getTrackingKey();
4446

0 commit comments

Comments
 (0)