[Neos] security.ifAccess

Piseth Sok piseth at web-essentials.asia
Wed Jul 2 10:15:42 CEST 2014


On 07/02/2014 02:16 PM, Søren Malling wrote:
> Is it a cached area?
>
> I know that the Neos backend had a similar issue, where the CSRF token was
> cached
>
> https://git.typo3.org/Packages/TYPO3.Neos.git/blob/HEAD:/Resources/Private/TypoScript/Prototypes/Page.ts2#l52
>
> https://git.typo3.org/Packages/TYPO3.Neos.git/commitdiff/6e89a55f99d6e7acb907d910e62c77b42a191de6
>
> Maybe that help you, if your issue is similar?
>
>
>
>
> On Wed, Jul 2, 2014 at 6:56 AM, Piseth Sok <piseth at web-essentials.asia>
> wrote:
>
>> Hi List,
>>
>> <f:security.ifAccess resource="TYPO3_Neos_Backend_GeneralAccess">
>>          <f:then>
>>                  Backend
>>          </f:then>
>>          <f:else>
>>                  Other
>>          </f:else>
>> </f:security.ifAccess>
>>
>> In Development context code above work fine, but in Production context it
>> always show "Backend".
>>
>> Did I do something wrong?
>> Thanks,
>> Piseth
>>
>>
>>
>> _______________________________________________
>> Neos mailing list
>> Neos at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
>>
Hi Søren,

It is not cache problem, it is condition for rendering content in Fluid 
if it is Backend or Frontend. Now it is fine now. Here is my code

<f:security.ifAccess resource="TYPO3_Neos_Backend_GeneralAccess">
	<f:if condition="{node.context.workspace.name} != 'live'">
		<f:then>
			<p >{linkText}</p>
		</f:then>
		<f:else>
			<a href="{link}">{linkText}</a>
		</f:else>
	</f:if>
</f:security.ifAccess>

Thanks,
Piseth


More information about the Neos mailing list