typoscript - TYPO3 - No inheritance of access rights possible via fluid -


via it's possible give fe_user access content if fe_group she/he belongs has subgroup fe_group defined group having access content.

so e.g. if define 'product group 02' (uid=2) should have access specific content via be, fe_user belongs 'user group 03' (uid=6), has subgroup 'product group 02' (uid=2), fe_user can access content.

fe_groups setup:

uid|title|subgroup 1|product group 01| 2|product group 02| 3|product group 03| 4|user group 01|1 5|user group 02| 6|user group 03|2,3 

but if define directly in fluidtemplate {f:cobject(typoscriptobjectpath: 'lib.usergroup')} == '2' should have access content , subsequently 'user group 03', mentioned fe_user can't access it:

typoscript:  lib.usergroup = text lib.usergroup.data = tsfe:fe_user|user|usergroup  partial.html  <f:if condition="{f:cobject(typoscriptobjectpath: 'lib.usergroup')} == '2'"> ... </f:if> 

// ... of course, if fe_user belongs 'product group 02' can access it.

but possible stick above fe_groups structure , still give mentioned fe_user access content via fluid?

tsfe:fe_user|user|usergroup fetches stored in user's usergroup. in case there 6 stored , compare 2, returns false.

moreover such solution can bring more troubles, if set more, 1 usergroup user. in such case tsfe:fe_user|user|usergroup return comma-separated list of usergroups uid, 6,2,3 , condition result in false again.

correct way in using f:security.ifhasrole viewhelper. so, should you:

<f:security.ifhasrole role="2">   stuff here </f:security.ifhasrole> 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -