[Flow] Flow 2.0 and roles
François Suter
fsu-lists at cobweb.ch
Mon Jan 6 12:09:31 CET 2014
Hi all,
A while ago I upgraded an application of mine from Flow 1.1 to Flow 2.0
and everything seemed fine. However I recently discovered I had an issue
with account management.
Until Flow 1.1 the roles were simple strings. It seems that they are now
objects. In my account editing view helper, I have something like:
<label class="checkbox">
<f:form.checkbox name="roles[0]"
value="Cobweb.Monitoring:Administrator"
checked="{monitoring:isSelectedRole(role:
'Cobweb.Monitoring:Administrator', list: account.roles)}" />
<f:translate source="Main">Administrator</f:translate>
</label>
<label class="checkbox">
<f:form.checkbox name="roles[1]" value="Cobweb.Monitoring:Cobweb"
checked="{monitoring:isSelectedRole(role: 'Cobweb.Monitoring:Cobweb',
list: account.roles)}" />
<f:translate source="Main">Cobweb</f:translate>
</label>
When I submit this form, I get the following error:
Warning: spl_object_hash() expects parameter 1 to be object, string
given in ...
I tried without success to do some property mapping, but I'm not sure if
it's the right way to proceed or if I just couldn't figure out how to do it.
How are roles supposed to be handled in Flow 2.0? Is there any example
code somewhere?
Thanks in advance for the help.
Cheers
--
Francois Suter
Work: Cobweb Development Sarl - http://www.cobweb.ch
TYPO3: Help the project! - http://typo3.org/contribute/
Appreciate my work? Support me -
http://www.monpetitcoin.com/en/francois/support-me/
More information about the Flow
mailing list