Hey,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I assume that the 'execute' method's signature has changed. Please feel free to fix this in <a href="http://svn.zope.org" target="_blank">svn.zope.org</a>. I'm no longer maintaining megrok.menu myself.<br>
</blockquote><div><br>thanks, I have write access to <a href="http://svn.zope.org">svn.zope.org</a> since today :)<br><br>I have been working on this, but I would like some feedback before commit changes. Actually, I already sent the import fix.<br>
But now I want to be sure about what I'm doing. It's my first time coding inside grokkers<br><br>I guess that megrok.menu was released before, grokcore.* (grokcore.view, grokcore.security). So, I made these changes<br>
<br>MenuItemGrokker now inherits from ViewSecurityGrokker instead of ViewGrokker. I understand that ViewSecurityGrokker adds the permission directive. am I right?<br><br>By doing this, I had to modify the 'execute' signature of MenuItemGrokker.<br>
<br>I also changed the 'callable' parameter on the config.action() call. Instead of use 'protectName' from zope.app.security.protectclass,<br>I'm using 'protect_getattr' from grokcore.security.util<br>
<br>And the last thing it's the 'discriminator'. I'm far away to understand how this works ... :(<br>but using 'protectName' I got this traceback<br><br>zope.configuration.config.ConfigurationConflictError: Conflicting configuration actions<br>
For: ('protectName', <class 'sample.app.Item1'>, 'browserDefault')<br>
File "/home/sancho/sample/src/sample/configure.zcml", line 7.2-7.27<br>
<grok:grok package="." /><br>
File "/home/sancho/sample/src/sample/configure.zcml", line 7.2-7.27<br>
<grok:grok package="." /><br>
For: ('protectName', <class 'sample.app.Item1'>, 'publishTraverse')<br>
File "/home/sancho/sample/src/sample/configure.zcml", line 7.2-7.27<br>
<grok:grok package="." /><br>
File "/home/sancho/sample/src/sample/configure.zcml", line 7.2-7.27<br>
<grok:grok package="." /><br><br></div></div><br>After some hours (sailing in the source code of zope and grok), I found that the ViewSecurityGrokker it's using the same 'discriminator', so I changed to 'protectMenuName' and it works. But as I said, I don't understand that means, or if I'm doing something wrong.<br>
<br>The thing is that now, megrok.menu it's working with Grok 0.14 and it pass all the automated tests<br><br>I'm not sure if I should commit these changes without understand what I'm doing... you tell me :)<br>
<br>Regards<br><br clear="all"><br>-- <br>Santiago Videla<br><a href="http://www.revolucionesweb.com.ar">www.revolucionesweb.com.ar</a><br><a href="http://www.linkedin.com/in/svidela">http://www.linkedin.com/in/svidela</a><br>
<br>Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el pensamiento que se hace corazón resplandece con la palabra sencilla y humilde que l@s tod@s somos.<br>