[FLOW3-general] How to authenticate a user in a CommandController

Dominique Feyer dfeyer at ttree.ch
Sun Feb 3 23:38:09 CET 2013


On 2013-02-01 22:17:51 +0000, Dominique Feyer said:

> Hi,
> 
> In a current projet we have a lots of long processing done by 
> CommandController. We use the security framework to hide some content 
> from normal user … but now the CommandController doesn't see those 
> hidden entities.
> 
> That break our project currently. I try to implement a fake auth 
> provider, based on the TestProvider used in Functionnal Test, but in 
> CommandController there is not WebRequest or HttpRequest so the session 
> can't work.
> 
> I need to have and Administrator logged in order to process all the 
> entities. How can I do that ? We can sponsorize this kind of feature.
> 
> Bests,
> 
> Dominique

I found a solution, by creating a new CommandRequestHandler who 
implement HttpRequestHandlerInterface, with this Request handler, I can 
create a dummy authentication provider, who automaticaly fake a user 
with Manager role in all my Command line controller.

A bit hack, but it work. I think that this kind of feature can be 
useful in the Flow core.

Bests,

Dominique Feyer



More information about the FLOW3-general mailing list