[TYPO3-mvc] Access control (very simple) example
Martin Kutschker
masi-no at spam-typo3.org
Fri Jan 8 09:09:56 CET 2010
Franz Koch schrieb:
> Hi,
>
>> I have a part of a fluid template that I only want to show to people who
>> are logged in and in a special group.
>>
>> Is there a way to do that within the condition of an<f:if> tag? I
>> tried various versions but couldn't get it to work.
>
> sure - you have multiple options to do this:
> a) provide a basic ACLviewHelper that fills your needs
> b) do the ACL checks in your controller and assign a special variable to
> the view you can check for lateron. eg:
Better: pass only those content to the view the client has access to.
public function index() {
if ($this->hasAccess()) {
$this->view->assign('yourObject',$this->yourObjectRepository->findAll());
}
}
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list