Skip to content

Security for Ressources #76

Closed Answered by klamparski
ZansDaus asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ZansDaus,

You can restrict access inside endpoint configuration, as on example below:

use SourceBroker\T3api\Annotation as T3api;

* @T3api\ApiResource(
*     collectionOperations={
*          "post"={
*              "path"="/comments",
*              "method"="POST",
*              "security"="frontend.user.isLoggedIn",
*          },
*     },
* )
class Comment extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
}

Inside security you can use all the TYPO3's conditions using Symfony expression language and write your custom ones

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kszymukowicz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #75 on June 15, 2023 15:39.