[TYPO3-mvc] How to implement access control for actions?

Jost Baron Jost.Baron at gmx.de
Thu Jul 12 09:26:10 CEST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Roland,

Two ideas:
1) Create two plugins, one of these allowed to use the restricted
actions, and one only allowed to use the non-restricted actions. Put
the first on an access-restricted page, the second one on a public page.

2) Create a Service which provides functions to check the current
access level by querying the currently logged in user and its groups
via TSFE and the Extbase User-Model and use it in your controller to
restrict actions.

The first solution might be quicker to implement, the second one
should give much more flexibility, and the service could be used in
ViewHelpers, other services etc. as well.

Greetings,
Jost

On 07/12/2012 09:00 AM, Roland wrote:
> hi everybody,
> 
> i would like to add access control to my delete actions and 
> unfortunatelly only found "TODO access protection" comments in the
> blog example.
> 
> how do you add access control to actions?
> 
> kind regards.
> 
> roland _______________________________________________ 
> TYPO3-project-typo3v4mvc mailing list 
> TYPO3-project-typo3v4mvc at lists.typo3.org 
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJP/nwMAAoJEG6HPMAgWtVz2EAP/AyoG07UOMblZBg/tXkAFM6g
34Pan9mtOD2tJEw95sPqQWKXXwKT+qP8KSBM7OGF7uczoR0KOGoCTQ63BS8TIcuS
Ls2YU8WFB7ijlTZSapxubThGyYT873CvdfHT3Dkg1lyCHlZfYLOLCPwCZahym4QI
CwHtd+Mpez42dGZQ3kJmkelyK1cmAZznE1hd+nkE6MXorWefs4w9wsXjIsjf41Ol
AUZSFCTE9Et/GTHJDo8THP5fSIm0G3vzaFlmikGZN9hJPL34k/Gm8ueQXeb+xw7N
XUumvpJkTI1bbCuHtT4lx4eP1FxmroHijajj8PDe7KuRAS0DG9tFNQUDQSzuMZEV
thKSiQWIsGuCsVW7slRXNEClaJLygcwMF4e1hQczSWFRxvKbBINX8VqcXK3DgbFi
9gzygESuIz9OS/tJd4p0PjFqM/x7NoB4AdAN4Sifl3EGCfvEB4Q2WNnVrvoIyps9
kakLQ/WAUzopSpouLXzkAYnlQ6k7+jsot1qbUGT2t8orLk4vErOi501taljrsSLs
hHk9ZGCwYB+40pSXG3cFjHJDX++ij+S7KSSECdWcBgpcZdYMRCK15kQhK/MlUOq8
sl6Ns0njBK393wRX9PABVD07XO5SiFo4dDOP3czdPwrSiVjjt6tfkBof2UmNeUS+
wwhE7h+GCxrCsu7dJyWy
=N9WB
-----END PGP SIGNATURE-----


More information about the TYPO3-project-typo3v4mvc mailing list