[Flow] Dynamically create Roles in Flow 3.0-beta1

Sascha Reule mail at sascha-reule.de
Fri May 8 07:12:49 CEST 2015


Hello everybody,

I'm currently playing around with Flow 3.0-beta1 and specially its refactored security framework.
Now I'm trying to determine if I could upgrade an existing project from 2.3.

Prior to Flow 3.0 there was a PolicyService in TYPO3\Flow\Security\Policy with the ability to create new Roles dynamically (via policyService->createRole('myNewRole') which adds the new Role to datebase).
I'm using this method because the project contains an administrative user management backend where we can add new users and roles (and of course assigning this new roles to users).

How can I do this in Flow 3.0?


I've found the signal 'emitRolesInitialized()' in the new PolicyService where I could hook into the bootstrapping process of Roles initialization.
But with this approach I have to persist all my custom and dynamically created Roles in an own Model and hook into the framework process on every request... best practise?!


Anyone has any idea for this?

Thanks!
Sascha


More information about the Flow mailing list