[Flow] Get all defined Roles in TYPO3 Flow 3.*
Jan Greth
jan at greth.me
Mon Jun 13 20:48:53 CEST 2016
Hey Sascha,
danke für die beiden Tipps... :) Sowohl für den Service als auch für den
Link. :)
schönen Abend noch,
Jan
--
Hey Sascha,
tanks for the hint and teh link.
Have a nice evening,
jan
Am 13.06.2016 um 18:28 schrieb Sascha Reule:
> Hello Jan,
>
> this maillinglist for Flow has closed and the community has moved to https://discuss.neos.io/
>
> Since Flow 3 roles aren’t stored in the database anymore, so you can’t access them through a repository.
> But you can inject Flow's PolicyService and fetch all registered roles through the getRoles() Method (see below).
>
> /**
> * @Flow\Inject
> * @var \TYPO3\Flow\Security\Policy\PolicyService
> */
> protected $policyService;
>
> // get all roles
> $allRoles = $this->policyService->getRoles();
>
> PS: You should know that the whole policy system was rewritten in Flow 3 and many things has changed.
>
>
> Liebe Grüße
> Sascha Reule
>
>
> Am 13. Juni 2016 um 15:45:05, Jan Greth (jan at greth.me<mailto:jan at greth.me>) schrieb:
>
> Hello at all,
>
> i have some Problems with the Security Changes since Flow 3.0
> Till then i had something like:
>
> /**
> * @var \TYPO3\Flow\Security\Policy\RoleRepository
> * @Flow\inject
> */
> protected $roleRepository;
>
> [...]
> $allRoles = $this->roleRepository->findAll();
> [...]
>
> But since the Roles aren't stored in DB now - how can i get all Roles,
> defined in Policy.yaml, in my Controller?
>
> Does anyone know how?
>
> Bye, Jan
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>
More information about the Flow
mailing list