[FLOW3-general] Simple access restricted FLOW3 app
"Christian Müller (Kitsunet)"
christian.mueller at typo3.org
Sun Apr 1 21:50:15 CEST 2012
Hi Henrik,
for one normally how you did it should be fine, maybe a caching issue? I
would need to check if the regex are somewhat limited but I would say it
should basically work as you planned.
To make it easier in bigger projects you might want to put your
controllers into subdirectories
Classes
Controller
Backend
AllTheOtherController.php
LoginController.php
That way you have a much easier time putting together the resource regex.
Cheers,
Christian
On 01.04.2012 17:32, Henrik Møller Rasmussen wrote:
> Hi,
>
> I am trying to create a simple access restricted FLOW3 app with only one
> role - Administrator.
>
> I'm having some problem though.
>
> I have a LoginController and some other controllers in the same
> namespace. How would you normally allow everyone access to the login
> controller, and permit logged in administrators to access everything?
>
> I've triede with the following policies without luck.
>
> I am also not 100% sure this is the right approach? Some guidance would
> be wonderful.
>
> Thanks in advance.
>
> Best regards
>
> Henrik Rasmussen
>
>
>
> ----------------
> roles:
> Administrator: []
>
> resources:
> methods:
> allMethods: 'method(Sb\Admin\Controller\[^Login]Controller->.*())'
>
> acls:
> Administrator:
> methods:
> allMethods: GRANT
> ----------------
>
> and
>
> ----------------
> roles:
> Administrator: []
>
> resources:
> methods:
> allMethods: 'method(Sb\Admin\Controller\(?!Login)Controller->.*())'
>
> acls:
> Administrator:
> methods:
> allMethods: GRANT
> ----------------
>
More information about the FLOW3-general
mailing list